mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-08 09:47:30 +00:00
Compare commits
1387
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc4f9cda69 | ||
|
|
a8a1bbe921 | ||
|
|
d9cd56ea76 | ||
|
|
d9ab6333ea | ||
|
|
62043b9a7c | ||
|
|
23ebf6e916 | ||
|
|
57c54a093b | ||
|
|
10f300094b | ||
|
|
c756ae2d9f | ||
|
|
868e3b1db8 | ||
|
|
4e5946adf7 | ||
|
|
da1b7847b3 | ||
|
|
a8f0c5a316 | ||
|
|
640501ab19 | ||
|
|
18cbccdd7c | ||
|
|
be9b8f0613 | ||
|
|
50ddf9e3d5 | ||
|
|
d140a799f7 | ||
|
|
db0872123b | ||
|
|
8b9ecac2dc | ||
|
|
53defde3e2 | ||
|
|
682c58c26f | ||
|
|
34dfe582ff | ||
|
|
282288efe4 | ||
|
|
b3df7086d7 | ||
|
|
b04a02660e | ||
|
|
73db4d5cca | ||
|
|
3da910ae24 | ||
|
|
7b388964ee | ||
|
|
5356c100ee | ||
|
|
9021105c89 | ||
|
|
b19fb9b6bd | ||
|
|
48ef7e52a2 | ||
|
|
90b4600fe8 | ||
|
|
920f6fd1fc | ||
|
|
6a93f284bc | ||
|
|
562e83bc6d | ||
|
|
aadc551965 | ||
|
|
fcdc025d11 | ||
|
|
de486f7897 | ||
|
|
62557742bd | ||
|
|
9f2cd78e67 | ||
|
|
c7d84acbcd | ||
|
|
9cd387439e | ||
|
|
fda23fc253 | ||
|
|
688268727e | ||
|
|
74ca22e9ca | ||
|
|
c438f0abc9 | ||
|
|
a31dd36ab9 | ||
|
|
ff0a08f508 | ||
|
|
76a2d2538c | ||
|
|
f896b9a354 | ||
|
|
5ae343b752 | ||
|
|
a4a0e18ec4 | ||
|
|
5343536429 | ||
|
|
3977f6380f | ||
|
|
b8f6e9dd03 | ||
|
|
4c9709ff0d | ||
|
|
cbc4b24a7a | ||
|
|
f194a3a25d | ||
|
|
ab13d02d53 | ||
|
|
b59e98b87c | ||
|
|
ea5ab044bf | ||
|
|
e109aa30d6 | ||
|
|
7173a63d46 | ||
|
|
c5c973d16f | ||
|
|
89107a221b | ||
|
|
04182c1361 | ||
|
|
0f9eee7662 | ||
|
|
c30d5a8d27 | ||
|
|
0df7721842 | ||
|
|
def1424b12 | ||
|
|
9789895f30 | ||
|
|
a790966b15 | ||
|
|
75bb019760 | ||
|
|
4ca1c611b3 | ||
|
|
a234329535 | ||
|
|
0ca80059c8 | ||
|
|
677df784c1 | ||
|
|
5fdc09fb36 | ||
|
|
51fc3dede2 | ||
|
|
56326195a4 | ||
|
|
52ff887db5 | ||
|
|
d8a4278ab4 | ||
|
|
735a0d148e | ||
|
|
3d1b363967 | ||
|
|
ecb7b4d271 | ||
|
|
d88fe953ae | ||
|
|
90c1689cf0 | ||
|
|
6496e39b53 | ||
|
|
7f41a6c77c | ||
|
|
7c84d6a082 | ||
|
|
9f25b9c1f7 | ||
|
|
40b89f34fb | ||
|
|
4575fe5a7c | ||
|
|
44a46d2a75 | ||
|
|
1a7f851985 | ||
|
|
a525d022ce | ||
|
|
2c95b113bd | ||
|
|
5c2c547d9e | ||
|
|
53738cf408 | ||
|
|
c8b8281e22 | ||
|
|
ed2b68a9c3 | ||
|
|
3bca4e220d | ||
|
|
96a35a3eea | ||
|
|
021ad113ef | ||
|
|
290525fdcd | ||
|
|
29585f985e | ||
|
|
ba8d49dce7 | ||
|
|
5ec120366c | ||
|
|
f24c8c6f4b | ||
|
|
9aa854dc6e | ||
|
|
7afdb75437 | ||
|
|
fde20cea27 | ||
|
|
cd2929aead | ||
|
|
3d3d238021 | ||
|
|
102156298a | ||
|
|
f1f91467fa | ||
|
|
b480b8dace | ||
|
|
a30cde3de5 | ||
|
|
08f7586031 | ||
|
|
30472a1cc1 | ||
|
|
2c42094494 | ||
|
|
e4b7e9e916 | ||
|
|
017a843f0a | ||
|
|
1373a16280 | ||
|
|
9bb4011d06 | ||
|
|
79527dd539 | ||
|
|
4e3f7a44da | ||
|
|
123d745249 | ||
|
|
69a075136f | ||
|
|
c63410f6be | ||
|
|
718b7308c3 | ||
|
|
cc077fd8d0 | ||
|
|
56b7b7a8a9 | ||
|
|
2aff369398 | ||
|
|
aab966a491 | ||
|
|
f98a741404 | ||
|
|
e1615b1882 | ||
|
|
79186d4fe9 | ||
|
|
19687ea1ed | ||
|
|
b3305dab64 | ||
|
|
29ab69a767 | ||
|
|
7d132e6578 | ||
|
|
a9606d1d4e | ||
|
|
104b4f38df | ||
|
|
e5f6dcb9c2 | ||
|
|
bf470dfe6c | ||
|
|
abe372481d | ||
|
|
85eb0bb29d | ||
|
|
aa4f8afc17 | ||
|
|
772c4026bb | ||
|
|
005d4c4deb | ||
|
|
1c2db161bf | ||
|
|
ea49b191aa | ||
|
|
c045d7a581 | ||
|
|
e0b531d5f4 | ||
|
|
c9167fa9df | ||
|
|
f338d8af5f | ||
|
|
fbc947f43f | ||
|
|
576b6e9236 | ||
|
|
cb44d1b30a | ||
|
|
9d6d8bf1fa | ||
|
|
f6d891674d | ||
|
|
e9427bc078 | ||
|
|
d805076ac2 | ||
|
|
ebe6dbbbae | ||
|
|
9f7874ccc5 | ||
|
|
21b2a241db | ||
|
|
96eada8f80 | ||
|
|
e0924de112 | ||
|
|
0f0f1cebcb | ||
|
|
0836e10a15 | ||
|
|
54790b5e63 | ||
|
|
c3fb9680ec | ||
|
|
83513d9580 | ||
|
|
c402d89f94 | ||
|
|
3af341356b | ||
|
|
428eb46f78 | ||
|
|
bf6e7e8034 | ||
|
|
9752d1a089 | ||
|
|
7c296bd9cc | ||
|
|
b410eaf6d4 | ||
|
|
a172147a91 | ||
|
|
a44137974b | ||
|
|
4caea0bb7a | ||
|
|
8aadb68db1 | ||
|
|
e67fa9823d | ||
|
|
51bbc2b4a8 | ||
|
|
f4e94a5030 | ||
|
|
668af98d75 | ||
|
|
d69d04cf75 | ||
|
|
3f4c7c8359 | ||
|
|
7893c72965 | ||
|
|
3e4a4f2376 | ||
|
|
313ca6b5e8 | ||
|
|
a5a9a4928b | ||
|
|
89153d9c05 | ||
|
|
8dd1fdb1a0 | ||
|
|
e007639f2a | ||
|
|
1ca6008767 | ||
|
|
01d5aec3aa | ||
|
|
eb8a55893d | ||
|
|
be6c3d8b62 | ||
|
|
549aec4500 | ||
|
|
f66de59603 | ||
|
|
9ea35f0d28 | ||
|
|
206b83f009 | ||
|
|
d4936d8fcf | ||
|
|
fbced1b9cc | ||
|
|
4773b98ac6 | ||
|
|
f869e47eae | ||
|
|
97863bb153 | ||
|
|
86a36cbd59 | ||
|
|
5390b6a291 | ||
|
|
0690bca499 | ||
|
|
9de5b9e04a | ||
|
|
8a6f3f80f2 | ||
|
|
4638a90a3a | ||
|
|
c7801827e5 | ||
|
|
4e526516e2 | ||
|
|
89874a4b0d | ||
|
|
30c81ea5c5 | ||
|
|
5643850ca4 | ||
|
|
7453e3c898 | ||
|
|
0216ab891b | ||
|
|
6da67bf234 | ||
|
|
327e33972b | ||
|
|
58e1dd2ee8 | ||
|
|
a650dd8a19 | ||
|
|
7edad11a74 | ||
|
|
9d8b0f805b | ||
|
|
feb22cdf5d | ||
|
|
0ca493768b | ||
|
|
7bb67a6200 | ||
|
|
bb5987fe74 | ||
|
|
84d4f5cad4 | ||
|
|
42df8a7401 | ||
|
|
63a31786b6 | ||
|
|
00d67abd30 | ||
|
|
8b824d99fa | ||
|
|
41d3f4dbbf | ||
|
|
15ff1d211b | ||
|
|
896d64be10 | ||
|
|
1237a33c79 | ||
|
|
e2d25ad5c6 | ||
|
|
eb3bc5aba6 | ||
|
|
8f96ea6b20 | ||
|
|
7b9d2e33bf | ||
|
|
f8c07fff2d | ||
|
|
4066a197be | ||
|
|
90ca5c4747 | ||
|
|
6787071417 | ||
|
|
246999a51f | ||
|
|
808f8ed306 | ||
|
|
7761580504 | ||
|
|
bb871497b7 | ||
|
|
7a0d047a68 | ||
|
|
b4266edb07 | ||
|
|
cef6cc1ec0 | ||
|
|
23b56e3c64 | ||
|
|
31dae9e367 | ||
|
|
9194a0fb12 | ||
|
|
6d2d3e7f60 | ||
|
|
09c9d44399 | ||
|
|
9ee9eaab3a | ||
|
|
c1877a3a30 | ||
|
|
467917cbde | ||
|
|
5bd82b6a04 | ||
|
|
3fad10919f | ||
|
|
3c10e038e2 | ||
|
|
2f960d70b9 | ||
|
|
55d313db99 | ||
|
|
2dbc46b7b1 | ||
|
|
e3fd1edc49 | ||
|
|
0bba8eeae1 | ||
|
|
c78d180231 | ||
|
|
99b85d1919 | ||
|
|
23f1e503c1 | ||
|
|
85cb7a2986 | ||
|
|
1d0ae2cde4 | ||
|
|
411280eb9d | ||
|
|
9936548993 | ||
|
|
d041052428 | ||
|
|
28f38ea4fe | ||
|
|
7ad2213278 | ||
|
|
86dfb4c292 | ||
|
|
aa8d04a87c | ||
|
|
155cac35d8 | ||
|
|
4c6ffdb1c2 | ||
|
|
adc4d1e5c8 | ||
|
|
7f4909d9f5 | ||
|
|
2d66c98f28 | ||
|
|
372f71eb1a | ||
|
|
88113794fd | ||
|
|
e1df83e8e0 | ||
|
|
f47760cbb6 | ||
|
|
699d59ea28 | ||
|
|
789897eb66 | ||
|
|
b0fd857c69 | ||
|
|
744a823fd2 | ||
|
|
641b0aa2d3 | ||
|
|
ec6861733b | ||
|
|
4ef7cb0700 | ||
|
|
c9c425d625 | ||
|
|
3ac0ae9dff | ||
|
|
3513866627 | ||
|
|
168ccfc133 | ||
|
|
1263932a0d | ||
|
|
148317f979 | ||
|
|
45c024c7dc | ||
|
|
b74e079ce7 | ||
|
|
c917e170f6 | ||
|
|
3afe39e21f | ||
|
|
f4e2a900d6 | ||
|
|
f5401b43b5 | ||
|
|
e95220e722 | ||
|
|
be8d4ef329 | ||
|
|
87efadc76c | ||
|
|
ece6962f06 | ||
|
|
a58ca45b2e | ||
|
|
96675e9d58 | ||
|
|
6efcc50176 | ||
|
|
42693bb820 | ||
|
|
ac8e3b67d0 | ||
|
|
51692417e8 | ||
|
|
4ecbeb8810 | ||
|
|
4f71062551 | ||
|
|
e8101d4f7b | ||
|
|
06382f01fd | ||
|
|
1722999310 | ||
|
|
dad6ac414e | ||
|
|
eb0cbbd2d9 | ||
|
|
4f1a593ac8 | ||
|
|
1cee6c5b78 | ||
|
|
bab31955c2 | ||
|
|
e51571595c | ||
|
|
c1ed6ef9cc | ||
|
|
1231a3e473 | ||
|
|
40b31d7487 | ||
|
|
d7b554ee11 | ||
|
|
11b749e047 | ||
|
|
fb8de6eec1 | ||
|
|
2cfa840eb5 | ||
|
|
59604815e1 | ||
|
|
ad271a2b33 | ||
|
|
af343ca8a1 | ||
|
|
ccb216ce49 | ||
|
|
a63013bfbf | ||
|
|
629bc67086 | ||
|
|
5c13954eed | ||
|
|
423d9f3868 | ||
|
|
f3f5820c46 | ||
|
|
ee513d6ed5 | ||
|
|
885e40db05 | ||
|
|
2bd5ad3131 | ||
|
|
1cce5ed178 | ||
|
|
81f59f0949 | ||
|
|
ee36612cef | ||
|
|
fd3d84ee52 | ||
|
|
68b639b4f5 | ||
|
|
1df6557b49 | ||
|
|
99c6e63e66 | ||
|
|
be59613ddf | ||
|
|
4d41c8ba49 | ||
|
|
6ace712438 | ||
|
|
ed0fe0e764 | ||
|
|
1e32fddb44 | ||
|
|
4eba5f1d39 | ||
|
|
80121ead56 | ||
|
|
58d1e0a2cc | ||
|
|
db8734c82f | ||
|
|
af5d38214b | ||
|
|
2787a746f4 | ||
|
|
5f893e68ff | ||
|
|
4aef5ef830 | ||
|
|
08011e1701 | ||
|
|
905fb8ef82 | ||
|
|
45ca7ec17d | ||
|
|
5bb19f7a9c | ||
|
|
3247b9a207 | ||
|
|
2b70aaf12d | ||
|
|
81ded022e0 | ||
|
|
6fd156b481 | ||
|
|
e4eb807516 | ||
|
|
e1d9d149ab | ||
|
|
dc7441c2fd | ||
|
|
7f62f74b85 | ||
|
|
344955d020 | ||
|
|
bcb7639fb3 | ||
|
|
37de6635b4 | ||
|
|
46a9e6c23f | ||
|
|
f6347145ff | ||
|
|
9f4c3eac9d | ||
|
|
80f13900f7 | ||
|
|
f2348a4826 | ||
|
|
057264d6ed | ||
|
|
055c523702 | ||
|
|
e805a607cf | ||
|
|
8a2788a5c8 | ||
|
|
68f35d5539 | ||
|
|
ec62b2d1cd | ||
|
|
277b0e15b8 | ||
|
|
94d7e1fa5b | ||
|
|
b784f02c0b | ||
|
|
cd3973612b | ||
|
|
f2457db5f3 | ||
|
|
4604031b84 | ||
|
|
23ca7b9f1a | ||
|
|
f34c1fbee2 | ||
|
|
b9b3aaa62f | ||
|
|
02e636f4c0 | ||
|
|
510adfc2a2 | ||
|
|
017cde1d11 | ||
|
|
6d6d52551e | ||
|
|
bea9651995 | ||
|
|
91130b6a00 | ||
|
|
d58ff645ff | ||
|
|
1a6116c1f2 | ||
|
|
e24f505bf9 | ||
|
|
78ec5a54a0 | ||
|
|
56ff5f7abf | ||
|
|
21abde5ca1 | ||
|
|
7a4d4bcd6b | ||
|
|
a61721741b | ||
|
|
0db7994248 | ||
|
|
cd754d7825 | ||
|
|
b982307dd1 | ||
|
|
16017f6d78 | ||
|
|
8adf849dce | ||
|
|
75879e3f18 | ||
|
|
8a4e08da4f | ||
|
|
5fcf863579 | ||
|
|
712cd89434 | ||
|
|
10342b4b9e | ||
|
|
4d1f03839c | ||
|
|
d3afeb5b4e | ||
|
|
4f88e66167 | ||
|
|
e3c5f6e890 | ||
|
|
b72a2738dc | ||
|
|
b9037f7d69 | ||
|
|
0249137148 | ||
|
|
074f52f382 | ||
|
|
4300d396b4 | ||
|
|
f54fca2cf6 | ||
|
|
b87f5e93a3 | ||
|
|
a43572123c | ||
|
|
2b61d55b1d | ||
|
|
50e9b1fe36 | ||
|
|
f5385608c1 | ||
|
|
8745b71fc6 | ||
|
|
51370ab76c | ||
|
|
440f8ad0a5 | ||
|
|
73908c2804 | ||
|
|
857e80f5c6 | ||
|
|
7f7c14d9f5 | ||
|
|
1ca7f07d1a | ||
|
|
5f81cba573 | ||
|
|
353dcc835f | ||
|
|
aa83dde27b | ||
|
|
5660a80cfc | ||
|
|
f72de266e2 | ||
|
|
397df3ca87 | ||
|
|
b3b67b04b7 | ||
|
|
930b212c23 | ||
|
|
37fb71b9ba | ||
|
|
887495811b | ||
|
|
fde2e61d54 | ||
|
|
33471de02a | ||
|
|
2d8b72535f | ||
|
|
3def9079fd | ||
|
|
69724dbc7c | ||
|
|
7fb72c1726 | ||
|
|
4e5597e061 | ||
|
|
1dcee33866 | ||
|
|
bd8aeb5342 | ||
|
|
f34b9d41be | ||
|
|
a6b31f04cd | ||
|
|
740fc2f5de | ||
|
|
02cad904ee | ||
|
|
85422c3c60 | ||
|
|
e8c219fef2 | ||
|
|
1f828a6e88 | ||
|
|
a1b07b6303 | ||
|
|
1d46433bfa | ||
|
|
64293ba38f | ||
|
|
7f5c13db41 | ||
|
|
a31dc47ae4 | ||
|
|
100196face | ||
|
|
fa5e623e95 | ||
|
|
49365eea79 | ||
|
|
29e8e565c6 | ||
|
|
3860254631 | ||
|
|
01a8f4606e | ||
|
|
da8843aa55 | ||
|
|
b952c2c95a | ||
|
|
993803e997 | ||
|
|
3f4e93f7d0 | ||
|
|
50595370e0 | ||
|
|
e092c0c00c | ||
|
|
8b8f191e59 | ||
|
|
2fdd934f42 | ||
|
|
1dfe76f5f6 | ||
|
|
c860633741 | ||
|
|
130b9e7ef2 | ||
|
|
eaa2a158c8 | ||
|
|
7f059e7255 | ||
|
|
6f2843fa20 | ||
|
|
9322b9d9a5 | ||
|
|
36e57ea2ae | ||
|
|
e216b8918e | ||
|
|
e834812a06 | ||
|
|
9eb2c1efb1 | ||
|
|
2a7b5f9190 | ||
|
|
392e856bc2 | ||
|
|
52dd20177c | ||
|
|
33d4092590 | ||
|
|
229b170885 | ||
|
|
2c94141b12 | ||
|
|
cacbf1ea28 | ||
|
|
8e45536cf4 | ||
|
|
4010b422dd | ||
|
|
bcb308c522 | ||
|
|
fd11a7e13e | ||
|
|
90feef368b | ||
|
|
8fd20c3ec7 | ||
|
|
16c363182d | ||
|
|
0beee41fc6 | ||
|
|
378440f7cf | ||
|
|
c51ba263dd | ||
|
|
91ed009ae2 | ||
|
|
effa42696e | ||
|
|
1a22c1eb86 | ||
|
|
92b963bb2e | ||
|
|
202b8100ab | ||
|
|
2c32d120b2 | ||
|
|
c54fa54e36 | ||
|
|
95afe462bd | ||
|
|
bd41577eb9 | ||
|
|
5be54abf24 | ||
|
|
29e5cf81bf | ||
|
|
ca7d7dbc01 | ||
|
|
ff127799e9 | ||
|
|
794d1bfd15 | ||
|
|
86abde5497 | ||
|
|
2573a5041f | ||
|
|
c9fea52cf9 | ||
|
|
4afe6d0f60 | ||
|
|
7da710c060 | ||
|
|
2eee0aa546 | ||
|
|
00df6fd744 | ||
|
|
1be47784eb | ||
|
|
fabf824eac | ||
|
|
6d67e11514 | ||
|
|
2e9f657aaf | ||
|
|
2deed22e5c | ||
|
|
10e0303620 | ||
|
|
a6b201c18c | ||
|
|
9f0eba9f10 | ||
|
|
f311ab1608 | ||
|
|
6614e8edb4 | ||
|
|
ba69d9958d | ||
|
|
763e1f3a09 | ||
|
|
5f98304f55 | ||
|
|
b0d0aff6a8 | ||
|
|
5a241ca1af | ||
|
|
3d5fd994e7 | ||
|
|
3d75fcae68 | ||
|
|
ff1b4be80c | ||
|
|
4dfdac7fba | ||
|
|
1d4f22bf63 | ||
|
|
b896825e8f | ||
|
|
ac523aa37e | ||
|
|
2a5a064a03 | ||
|
|
66e4f71040 | ||
|
|
515d7e7dae | ||
|
|
cb5891d277 | ||
|
|
8f1ff9e85e | ||
|
|
303dc9e96a | ||
|
|
4b5e7d6618 | ||
|
|
dfaaa8ff95 | ||
|
|
5b315e1304 | ||
|
|
0c03253635 | ||
|
|
d1a6a64675 | ||
|
|
ee5e330bcf | ||
|
|
d47e4b8617 | ||
|
|
b0c7ac2dc1 | ||
|
|
a67157c2c2 | ||
|
|
1c16ed47bc | ||
|
|
50aec09e04 | ||
|
|
89efa59e98 | ||
|
|
e9484d5c37 | ||
|
|
d049d4a6bd | ||
|
|
10249f2dfb | ||
|
|
eadbbec532 | ||
|
|
1702067ac0 | ||
|
|
091dc3840d | ||
|
|
940f58c2de | ||
|
|
e708c0ba70 | ||
|
|
2297f670b1 | ||
|
|
d8a75cf7e5 | ||
|
|
cfa7028d66 | ||
|
|
7d3341bee3 | ||
|
|
234f029727 | ||
|
|
388f7cdccc | ||
|
|
2456af596f | ||
|
|
9b9ab1793f | ||
|
|
684dca9aca | ||
|
|
fd7dc3024c | ||
|
|
947e17b1da | ||
|
|
56adbffdbf | ||
|
|
63526e633e | ||
|
|
cb62c5d5f8 | ||
|
|
e16710f1b5 | ||
|
|
a536df5327 | ||
|
|
3998034acb | ||
|
|
93e9520314 | ||
|
|
22bb1fbe5f | ||
|
|
bb57053f76 | ||
|
|
7f87a319aa | ||
|
|
f9f8691feb | ||
|
|
268a981c3a | ||
|
|
777f8dccca | ||
|
|
de5e2a58df | ||
|
|
322be14458 | ||
|
|
9d640cc990 | ||
|
|
bc8d0782dd | ||
|
|
c80c71f48b | ||
|
|
7c43b6829f | ||
|
|
35e3efbd41 | ||
|
|
d57210fb0b | ||
|
|
cd5b7dd64a | ||
|
|
6a449f2b02 | ||
|
|
a18d4d2085 | ||
|
|
772e4fa41a | ||
|
|
8741aa825d | ||
|
|
ffbb3c8bd8 | ||
|
|
c454a4156e | ||
|
|
ff3b0c84a3 | ||
|
|
f8c0f76881 | ||
|
|
8c9e222689 | ||
|
|
388195de8b | ||
|
|
520602ae4e | ||
|
|
b831ca7d64 | ||
|
|
7d6784d98d | ||
|
|
fe8f752946 | ||
|
|
baadf90fb5 | ||
|
|
c3cc31c745 | ||
|
|
dd43255b27 | ||
|
|
e15172f0e2 | ||
|
|
fce46168d1 | ||
|
|
98087ab562 | ||
|
|
15925864b2 | ||
|
|
0404a02430 | ||
|
|
6e815b76ea | ||
|
|
153ef54498 | ||
|
|
536221be39 | ||
|
|
4a6869c98e | ||
|
|
80a05cd78c | ||
|
|
5b1f7bc8ac | ||
|
|
405d07de96 | ||
|
|
8975f1dceb | ||
|
|
53a5eccf66 | ||
|
|
10b5f74855 | ||
|
|
789aa48043 | ||
|
|
6b8afa5d42 | ||
|
|
fd50caf95a | ||
|
|
0ffda3cc49 | ||
|
|
34c2b0a07c | ||
|
|
66f1be08c8 | ||
|
|
4b57e0e9f7 | ||
|
|
3cda6a750e | ||
|
|
da66298659 | ||
|
|
eb6f625d83 | ||
|
|
6e1dee8c1e | ||
|
|
a4edfc06c5 | ||
|
|
1e5a405c5c | ||
|
|
7957b20b48 | ||
|
|
38cdb8e7b7 | ||
|
|
49b4ac0a1c | ||
|
|
da132274a4 | ||
|
|
d3d350e7ce | ||
|
|
9b509a3bad | ||
|
|
9a63d8af7f | ||
|
|
3fb9b8f42d | ||
|
|
1d92510032 | ||
|
|
34cc1de229 | ||
|
|
5d6516be86 | ||
|
|
80b4f8fa5b | ||
|
|
c141fcbf53 | ||
|
|
21785afbe8 | ||
|
|
39aa0c4d3a | ||
|
|
f14961b005 | ||
|
|
fa9b168161 | ||
|
|
d19a44a6aa | ||
|
|
95ca9db755 | ||
|
|
71d4206074 | ||
|
|
87a491d7b6 | ||
|
|
c6ddfd4440 | ||
|
|
33f9499975 | ||
|
|
84eb48f0a1 | ||
|
|
43d91224f6 | ||
|
|
8f8889d02d | ||
|
|
6c68ac0def | ||
|
|
f5888acfba | ||
|
|
bd900fb66b | ||
|
|
ae11748038 | ||
|
|
a6d9b5ed18 | ||
|
|
b791918443 | ||
|
|
c885f468aa | ||
|
|
090d39b7b1 | ||
|
|
baad58df05 | ||
|
|
ef0bd3d102 | ||
|
|
f29eae1302 | ||
|
|
e3ae196da8 | ||
|
|
f8ecf34bf1 | ||
|
|
b73a6f883d | ||
|
|
70b8e3e8f6 | ||
|
|
cbfa4c88d9 | ||
|
|
2987d5216e | ||
|
|
17ce56825d | ||
|
|
fcefeee914 | ||
|
|
e48192fbb5 | ||
|
|
4c99114a25 | ||
|
|
8b794bb1dd | ||
|
|
e1705c0810 | ||
|
|
e38d7accb7 | ||
|
|
fa02b85082 | ||
|
|
447bf163ef | ||
|
|
7d5cfd3766 | ||
|
|
3ad9d62949 | ||
|
|
565400780b | ||
|
|
a99ca5a64a | ||
|
|
fbbbcdbaa7 | ||
|
|
59b455cf2f | ||
|
|
bd06de9ae9 | ||
|
|
cd40d5df9f | ||
|
|
a35d575ba6 | ||
|
|
785fd93311 | ||
|
|
2db5dc37c8 | ||
|
|
d532ba06c6 | ||
|
|
a5f1a555f3 | ||
|
|
495a957c99 | ||
|
|
9ded807a20 | ||
|
|
f38e760c39 | ||
|
|
7565347ba0 | ||
|
|
988435cf04 | ||
|
|
c532a70746 | ||
|
|
424b2e83b8 | ||
|
|
0b5ca3f7d5 | ||
|
|
79f857b323 | ||
|
|
34a7f94d57 | ||
|
|
4292f89345 | ||
|
|
190e2e73e9 | ||
|
|
988302171a | ||
|
|
e53b791b3e | ||
|
|
177e77fdab | ||
|
|
17fe680117 | ||
|
|
35f43ad274 | ||
|
|
e4e7047e4a | ||
|
|
3ca7eb7485 | ||
|
|
239d30bbee | ||
|
|
7272d029a5 | ||
|
|
f775d18b2c | ||
|
|
aa49d4af62 | ||
|
|
b595b1f01a | ||
|
|
a2bdc522f5 | ||
|
|
aa5c0ffcbf | ||
|
|
727398b2d4 | ||
|
|
e5360259a4 | ||
|
|
111d36a3c8 | ||
|
|
df74f1dfab | ||
|
|
307a234879 | ||
|
|
3ce3e9ba27 | ||
|
|
66175ef9fe | ||
|
|
d1c1e99d98 | ||
|
|
7dca298b21 | ||
|
|
16b6a3f5e4 | ||
|
|
598f9f52b7 | ||
|
|
981e1ae7b8 | ||
|
|
13692ff313 | ||
|
|
6caf633cf7 | ||
|
|
5bbc4114f1 | ||
|
|
165361a515 | ||
|
|
6ebdd64d3c | ||
|
|
c85390a691 | ||
|
|
6303aec7ff | ||
|
|
ce826716d5 | ||
|
|
d6a55b532c | ||
|
|
cefc1f2336 | ||
|
|
6b8059afe9 | ||
|
|
53e19d5102 | ||
|
|
1f0049158a | ||
|
|
6bbf0105af | ||
|
|
8cae0bf725 | ||
|
|
16380b0155 | ||
|
|
3afe0e2ed1 | ||
|
|
0d3085944f | ||
|
|
d973e2c25b | ||
|
|
a52af6cd7c | ||
|
|
66a172c9b4 | ||
|
|
618c98179b | ||
|
|
28b8d17c28 | ||
|
|
e962769fee | ||
|
|
61c0f610dc | ||
|
|
fce92e3ca2 | ||
|
|
2c5c26f205 | ||
|
|
7ef638aa30 | ||
|
|
318a59d302 | ||
|
|
719d995a9d | ||
|
|
5d51452545 | ||
|
|
02c42362ff | ||
|
|
5be482030e | ||
|
|
968d2c5b33 | ||
|
|
ab99eb59fb | ||
|
|
c250702c40 | ||
|
|
e465e94a12 | ||
|
|
1769d69ca3 | ||
|
|
eb4b5ffd22 | ||
|
|
a526b42211 | ||
|
|
62be931c9f | ||
|
|
e008af1364 | ||
|
|
619537208b | ||
|
|
fee1263ca3 | ||
|
|
02d2a5db3a | ||
|
|
fd7153b0f3 | ||
|
|
6df3a21309 | ||
|
|
1f5ee72e2d | ||
|
|
5928970d22 | ||
|
|
cbc8b0f4b4 | ||
|
|
e7c50e4866 | ||
|
|
6caaf70451 | ||
|
|
bcec04f1d9 | ||
|
|
07a8327a0e | ||
|
|
2e738b519f | ||
|
|
b8063c342c | ||
|
|
438e9bdc93 | ||
|
|
bd593d3da6 | ||
|
|
a2ad91df33 | ||
|
|
164cbab7c6 | ||
|
|
cac15508d5 | ||
|
|
d64c9d2823 | ||
|
|
f20194149f | ||
|
|
43793b94f7 | ||
|
|
2ef880c048 | ||
|
|
f18b903d5f | ||
|
|
99f151f1bd | ||
|
|
a1c036b8cf | ||
|
|
390dccacac | ||
|
|
131dfb4a02 | ||
|
|
8df948c5c2 | ||
|
|
97de5b2106 | ||
|
|
8e3fdccb8d | ||
|
|
88426390a8 | ||
|
|
77f4e1c8c7 | ||
|
|
2b0a8049db | ||
|
|
d09ec3261f | ||
|
|
f79e3fa02f | ||
|
|
a9d4cf9023 | ||
|
|
0eeee6b7c8 | ||
|
|
f6c8918a0d | ||
|
|
ce9a9fb1dc | ||
|
|
9097a78187 | ||
|
|
7b89a0037d | ||
|
|
f3c1222da3 | ||
|
|
b54f915280 | ||
|
|
01740bfb0d | ||
|
|
cdb98a04a5 | ||
|
|
0d714115ab | ||
|
|
53bdf0b5cc | ||
|
|
a29791411b | ||
|
|
796ff183b0 | ||
|
|
3c766f379b | ||
|
|
dee9053cb6 | ||
|
|
3570258050 | ||
|
|
b51aa1f36f | ||
|
|
420d668f33 | ||
|
|
ae19180641 | ||
|
|
717acfe9c5 | ||
|
|
8f58728e2b | ||
|
|
b98d2a8261 | ||
|
|
605b1aa394 | ||
|
|
9fb095b50e | ||
|
|
d1a9eca805 | ||
|
|
03e842ccb8 | ||
|
|
fddf89aff7 | ||
|
|
d975678006 | ||
|
|
62adbfc521 | ||
|
|
6bcc8ff0c7 | ||
|
|
eb0e694665 | ||
|
|
ef1d6987fd | ||
|
|
e52889acd9 | ||
|
|
99b4051eca | ||
|
|
cbd3f41ba8 | ||
|
|
edd7025645 | ||
|
|
a712da5cee | ||
|
|
e346a6b538 | ||
|
|
6cac26c21f | ||
|
|
6ce07a85e4 | ||
|
|
a7d1bc96be | ||
|
|
216067b63f | ||
|
|
1868bfdcdf | ||
|
|
a4a4de55f7 | ||
|
|
c9dfab5024 | ||
|
|
897bb1b572 | ||
|
|
1aa01da212 | ||
|
|
cf8545794b | ||
|
|
9c88d20070 | ||
|
|
df2935808e | ||
|
|
4e63aa4566 | ||
|
|
2ffa48b447 | ||
|
|
fb330f795d | ||
|
|
764747ec7f | ||
|
|
0f06ad29a6 | ||
|
|
1326e17536 | ||
|
|
d530b82b26 | ||
|
|
1251445abc | ||
|
|
c5b2c8ba93 | ||
|
|
deff917851 | ||
|
|
c8ffb0ba59 | ||
|
|
eb8cd900a6 | ||
|
|
d180634e07 | ||
|
|
e49ad341bd | ||
|
|
b4e48b952e | ||
|
|
039551788b | ||
|
|
dce9fd0e44 | ||
|
|
5dff860557 | ||
|
|
eea5d09eb9 | ||
|
|
471a07f223 | ||
|
|
66eedaa03d | ||
|
|
467b5e4892 | ||
|
|
169606602b | ||
|
|
01ecd47a05 | ||
|
|
022159a6cd | ||
|
|
4a81e8c111 | ||
|
|
c183168481 | ||
|
|
02b0cef4d8 | ||
|
|
61fcaf564a | ||
|
|
c904bb2b87 | ||
|
|
962d39e86e | ||
|
|
ff843bacf4 | ||
|
|
0ebcdb28af | ||
|
|
b928bdceb8 | ||
|
|
6a8fdc6c5c | ||
|
|
3b649d637d | ||
|
|
34c40031ca | ||
|
|
24b26065e0 | ||
|
|
98bf43f229 | ||
|
|
8e58cc501f | ||
|
|
4f0f3c3ba0 | ||
|
|
0b7fd17c2b | ||
|
|
d7ac0f2c9d | ||
|
|
a14261bc42 | ||
|
|
7864fdfdee | ||
|
|
6dd322874e | ||
|
|
a5418dc0ac | ||
|
|
11fabacc3c | ||
|
|
0e0f3eb097 | ||
|
|
10eb67a3aa | ||
|
|
8ed100e5c5 | ||
|
|
eedf4e973f | ||
|
|
663d46ea23 | ||
|
|
edfd7f9a80 | ||
|
|
458352954d | ||
|
|
88a0832a09 | ||
|
|
32af54f62b | ||
|
|
48ef2d62ba | ||
|
|
e2168491a1 | ||
|
|
d3a7f5be38 | ||
|
|
dd6cccf50e | ||
|
|
45ba649c8e | ||
|
|
45a5555b09 | ||
|
|
102c6ce4b8 | ||
|
|
78d77c1476 | ||
|
|
ad730a374b | ||
|
|
ebe02095df | ||
|
|
ff8a716efe | ||
|
|
7fdfcc28ec | ||
|
|
3701bc4207 | ||
|
|
1cefd77f1c | ||
|
|
9d2bcf2bd0 | ||
|
|
194e8828a1 | ||
|
|
de9f39beda | ||
|
|
2bfe0001da | ||
|
|
e93df14b67 | ||
|
|
a8401a33c6 | ||
|
|
d8d6ff3c4c | ||
|
|
7e0baa7a1d | ||
|
|
50b014b957 | ||
|
|
f8983e467f | ||
|
|
cd9e047d65 | ||
|
|
fe0f40254f | ||
|
|
d5d6c79584 | ||
|
|
1c36e3472f | ||
|
|
4a1da8b6f9 | ||
|
|
bfac4633a5 | ||
|
|
675ce84475 | ||
|
|
b7a8baf1bb | ||
|
|
b9d1b21598 | ||
|
|
7eec1997ef | ||
|
|
8aa6d9cb35 | ||
|
|
a23c64ee8b | ||
|
|
950e7224ad | ||
|
|
5af7dff758 | ||
|
|
375474ce86 | ||
|
|
7f158268aa | ||
|
|
76061b701e | ||
|
|
09d281ff62 | ||
|
|
c012528fe1 | ||
|
|
e46a517ed6 | ||
|
|
1a8da63ca0 | ||
|
|
dae76aa1b5 | ||
|
|
01d478ba56 | ||
|
|
5673378ea6 | ||
|
|
2ffe85ddac | ||
|
|
5a35a6bafc | ||
|
|
d1f1d40527 | ||
|
|
d4b160c0d6 | ||
|
|
b6d29b2347 | ||
|
|
93d51636f7 | ||
|
|
e374f6fd31 | ||
|
|
70345bd222 | ||
|
|
0b7a9cea88 | ||
|
|
1f6c248909 | ||
|
|
1b993610c1 | ||
|
|
746f01802d | ||
|
|
06388f5181 | ||
|
|
ab36e22aeb | ||
|
|
8a8c3eafc8 | ||
|
|
22e9ff476a | ||
|
|
45cfada9a1 | ||
|
|
efc005c078 | ||
|
|
110735c3bb | ||
|
|
a4146cc890 | ||
|
|
4ef2af7c72 | ||
|
|
1db5c7d1e2 | ||
|
|
467c4314b8 | ||
|
|
c106ab8ba0 | ||
|
|
48db9618b8 | ||
|
|
4c818aec33 | ||
|
|
30c5b53ad1 | ||
|
|
a35237795f | ||
|
|
3c51a88d0c | ||
|
|
f27956eb19 | ||
|
|
3bd5d5dc13 | ||
|
|
cf10288201 | ||
|
|
dc5af6decc | ||
|
|
8fe69306dc | ||
|
|
1e7c5b8562 | ||
|
|
1e56dd781a | ||
|
|
a00a1d12ea | ||
|
|
7bb2af41e3 | ||
|
|
898c8ead87 | ||
|
|
13b67621cf | ||
|
|
1e672d4528 | ||
|
|
678508b426 | ||
|
|
ccacfd880b | ||
|
|
b470fe138b | ||
|
|
ecd354ada1 | ||
|
|
6341c60f67 | ||
|
|
c521aeda57 | ||
|
|
640c8226aa | ||
|
|
1c641cfdee | ||
|
|
01a4220954 | ||
|
|
0aed5fd91c | ||
|
|
7fcaa66bcd | ||
|
|
c6449f307a | ||
|
|
8c65f81676 | ||
|
|
5ec49e9c79 | ||
|
|
666a53a247 | ||
|
|
950fb739f8 | ||
|
|
8fb954ae4f | ||
|
|
7213c743f0 | ||
|
|
bc7abb3300 | ||
|
|
ae1043ba0d | ||
|
|
a0e46521e3 | ||
|
|
3637589db1 | ||
|
|
ebd9e89fcf | ||
|
|
949574d027 | ||
|
|
c07a056dac | ||
|
|
56dcb7ed07 | ||
|
|
844938ec4e | ||
|
|
635d7fbfae | ||
|
|
8715b55ce0 | ||
|
|
a982eb2267 | ||
|
|
124fe30f03 | ||
|
|
1ae552c7d1 | ||
|
|
178ae887ab | ||
|
|
181da8f232 | ||
|
|
86920d4c68 | ||
|
|
7744e04b42 | ||
|
|
015884dda5 | ||
|
|
0ebb7335c9 | ||
|
|
2980f7f92d | ||
|
|
9786b16e9f | ||
|
|
833339c692 | ||
|
|
0d9c0616f9 | ||
|
|
9cd4929417 | ||
|
|
1e949e6caa | ||
|
|
e50b33c240 | ||
|
|
44cf237a72 | ||
|
|
90331b27ac | ||
|
|
a603902561 | ||
|
|
f1b988d2af | ||
|
|
3bbc7466fc | ||
|
|
636b8927c6 | ||
|
|
2bd6846adc | ||
|
|
fb39eda0d8 | ||
|
|
afccb58612 | ||
|
|
8c82566b48 | ||
|
|
030c0fd415 | ||
|
|
73bd59943c | ||
|
|
abb31591ff | ||
|
|
81c4fd5efc | ||
|
|
7a2e01c592 | ||
|
|
62227a03b1 | ||
|
|
69d1e788c0 | ||
|
|
9bfd5e5e55 | ||
|
|
fb69f854af | ||
|
|
8e12a0126e | ||
|
|
b5447a4d7a | ||
|
|
ac309e9696 | ||
|
|
d3007a8ca9 | ||
|
|
ce3c002a16 | ||
|
|
0399d94e35 | ||
|
|
51491d06f1 | ||
|
|
5dadceb115 | ||
|
|
8a5bc5b674 | ||
|
|
0a142bb94e | ||
|
|
80db548369 | ||
|
|
bf913cc61d | ||
|
|
a9abc3ab6b | ||
|
|
385d1aa664 | ||
|
|
fcd7794c2b | ||
|
|
36c87e18d6 | ||
|
|
f78e1408c5 | ||
|
|
1895a09749 | ||
|
|
cecfdbe71e | ||
|
|
e5835b63c9 | ||
|
|
cf9ea9d9cd | ||
|
|
ff53dde157 | ||
|
|
e319b5f6a5 | ||
|
|
57735564ec | ||
|
|
148a3396ec | ||
|
|
7bd0936291 | ||
|
|
4197a68602 | ||
|
|
c3bff72209 | ||
|
|
f9d1b16d8b | ||
|
|
8a86e37d69 | ||
|
|
faf4f764b7 | ||
|
|
3d939af4a3 | ||
|
|
69a44fdae8 | ||
|
|
f9fc8f78ab | ||
|
|
a33c135b0a | ||
|
|
25df65b0b8 | ||
|
|
ff4031585a | ||
|
|
3c61d015c2 | ||
|
|
9b916e6a48 | ||
|
|
78a1fdfcaa | ||
|
|
93feb306f8 | ||
|
|
e3e75eb2da | ||
|
|
ec93ec1fb1 | ||
|
|
e191baa1a3 | ||
|
|
fd4e7282fe | ||
|
|
09d2f7e280 | ||
|
|
0f54988877 | ||
|
|
d348a83a72 | ||
|
|
27ca66b410 | ||
|
|
21f77edba0 | ||
|
|
5df3ca812b | ||
|
|
3563e0adba | ||
|
|
f1eefa64ec | ||
|
|
df4547a3df | ||
|
|
0fa7618f7c | ||
|
|
94cca68983 | ||
|
|
cab5f6afb8 | ||
|
|
9a8a9d774e | ||
|
|
3d3d385d37 | ||
|
|
887c672a6c | ||
|
|
7a0855aeb5 | ||
|
|
83d987b48d | ||
|
|
e09b2d0df4 | ||
|
|
58acf7dbe1 | ||
|
|
72c4912f58 | ||
|
|
773e306df2 | ||
|
|
7182e722ca | ||
|
|
ee82f87cbf | ||
|
|
251cda4941 | ||
|
|
5d10b23a78 | ||
|
|
1ea8d6afac | ||
|
|
dec92a445f | ||
|
|
617266e33e | ||
|
|
417f74451f | ||
|
|
112525ea9f | ||
|
|
2aaa538aef | ||
|
|
be6afb3fcc | ||
|
|
22dba603f5 | ||
|
|
4571d8ddea | ||
|
|
521f03c184 | ||
|
|
0eb51100b7 | ||
|
|
6d51f4a788 | ||
|
|
32dffec0f8 | ||
|
|
cd8c4268ec | ||
|
|
03851ced5f | ||
|
|
ae0d73e87d | ||
|
|
c9158aec30 | ||
|
|
34e74f8afe | ||
|
|
cf1d0f1844 | ||
|
|
49b2166e1a | ||
|
|
99133bf4bb | ||
|
|
f51150584c | ||
|
|
30b43665e8 | ||
|
|
3fdc316faf | ||
|
|
4686a3b50e | ||
|
|
0236982d6d | ||
|
|
2472700dd1 | ||
|
|
08bd9586fb | ||
|
|
61ceb9e5ab | ||
|
|
c32de173c3 | ||
|
|
78cec9f33e | ||
|
|
39af86f017 | ||
|
|
d91068a88a | ||
|
|
f9bc6ac04e | ||
|
|
1ec84f9c21 | ||
|
|
22bfb799a7 | ||
|
|
8a3edf2cab | ||
|
|
bd29009c31 | ||
|
|
7741269930 | ||
|
|
3ac4c96641 | ||
|
|
072755ca8d | ||
|
|
6ba87f8cf6 | ||
|
|
398923de53 | ||
|
|
cde504ad27 | ||
|
|
8090fbb686 | ||
|
|
0302ee5992 | ||
|
|
88de714c41 | ||
|
|
ccc12f8801 | ||
|
|
d0fd31018b | ||
|
|
5e0dec4a40 | ||
|
|
c2588fd0bd | ||
|
|
6ceddbb1d5 | ||
|
|
e80b2b13fa | ||
|
|
c5cf13eb29 | ||
|
|
7f689fc044 | ||
|
|
a8b0d9609c | ||
|
|
dc5cd319e5 | ||
|
|
cc590f49f2 | ||
|
|
767ea7a7e4 | ||
|
|
f365665213 | ||
|
|
11f4909068 | ||
|
|
2936860d24 | ||
|
|
eb7979ab5b | ||
|
|
650008eea1 | ||
|
|
8580374aa1 | ||
|
|
af77bc0583 | ||
|
|
d1f9ac5bb9 | ||
|
|
fdb5ce845f | ||
|
|
92437e9db1 | ||
|
|
bad35f5484 | ||
|
|
c80906e4cc | ||
|
|
400ca09018 | ||
|
|
0f82e6de23 | ||
|
|
7114e3f9a9 | ||
|
|
674f4bac47 | ||
|
|
9ebc920044 | ||
|
|
7e0a18d014 | ||
|
|
e043439ff6 | ||
|
|
957327e8bc | ||
|
|
33789f8cdf | ||
|
|
c97760776b | ||
|
|
aa09d60d7d | ||
|
|
86c03cceb0 | ||
|
|
1596e646fc | ||
|
|
f04936f8a1 | ||
|
|
a786fc4ab7 | ||
|
|
b458902704 | ||
|
|
715ff77344 | ||
|
|
4099600941 | ||
|
|
3df1e68fe9 | ||
|
|
a5b03338f8 | ||
|
|
aeb3476923 | ||
|
|
87fbbfa692 | ||
|
|
a859e83392 | ||
|
|
a8bb2a86b1 | ||
|
|
09915a1597 | ||
|
|
a704be730c | ||
|
|
1e438060af | ||
|
|
11acad981c | ||
|
|
31c3dfdf52 | ||
|
|
d7779d8bdf | ||
|
|
e5a2f0f95c | ||
|
|
1e632ffdee | ||
|
|
5354940f93 | ||
|
|
3564810150 | ||
|
|
f428c40ac2 | ||
|
|
073bb3fdf8 | ||
|
|
db3d16dca1 | ||
|
|
6173835699 | ||
|
|
0aefa3e037 | ||
|
|
7dd8b901e6 | ||
|
|
29571bf2b1 | ||
|
|
44845ea24b | ||
|
|
760a17729e | ||
|
|
4a4d185637 | ||
|
|
f4e20147b5 | ||
|
|
f0ed744125 | ||
|
|
5fcb963f09 | ||
|
|
d20eec24ce | ||
|
|
7bde3adbd4 | ||
|
|
efb51322c1 | ||
|
|
03c844305f | ||
|
|
e2e6363488 | ||
|
|
08ff225a46 | ||
|
|
6d77362190 | ||
|
|
8bff24d65b | ||
|
|
8669a15755 | ||
|
|
69223ccebd | ||
|
|
c2279a0217 | ||
|
|
46e672243a | ||
|
|
ac0e07ecda | ||
|
|
0aa5f2ea3c | ||
|
|
4e6e741af8 | ||
|
|
ccc2b1b8ce | ||
|
|
31be486539 | ||
|
|
f615ec59cb | ||
|
|
7f008ae327 | ||
|
|
c20fb0c22d | ||
|
|
f1941064de | ||
|
|
13e9da59ff | ||
|
|
8ab33a4d13 | ||
|
|
521e1d218c | ||
|
|
6baa5bc2dc | ||
|
|
fe24b820be | ||
|
|
10503a3b92 | ||
|
|
2a6fbb620c | ||
|
|
4a658e8b51 | ||
|
|
c693ca137f | ||
|
|
e2e7283a30 | ||
|
|
ae827bae28 | ||
|
|
ce42de535a | ||
|
|
08838fe79a | ||
|
|
ed2933342c | ||
|
|
7fc980e1fa | ||
|
|
fb20aee667 | ||
|
|
69ddfd0acb | ||
|
|
1dd49bd4d6 | ||
|
|
c82eca90f4 | ||
|
|
654b75694a | ||
|
|
dc6d46c180 | ||
|
|
602914d824 | ||
|
|
7342fc7a28 | ||
|
|
7894d58ae5 | ||
|
|
74011b6767 | ||
|
|
dee6170da3 | ||
|
|
ffef0d8d44 | ||
|
|
b0f87cdb5f | ||
|
|
3f65342eb2 | ||
|
|
33ceae2809 | ||
|
|
afedd22f19 | ||
|
|
4132ec828d | ||
|
|
23dfe91b60 | ||
|
|
f3ac213120 | ||
|
|
fc5daee434 | ||
|
|
f626eb4986 | ||
|
|
59ddaefd72 | ||
|
|
0d6a794d85 | ||
|
|
9a751419cf | ||
|
|
cb35b7e4ed | ||
|
|
07f7b8c1e3 | ||
|
|
010f7850e0 | ||
|
|
c88ccc49a1 | ||
|
|
3f43d41ba6 | ||
|
|
7a3e2ee70a | ||
|
|
f4357f3254 | ||
|
|
c32bba9644 | ||
|
|
3ba2d1bf88 | ||
|
|
7d5e93ac57 | ||
|
|
fa89a5f940 | ||
|
|
fe22dc5ff8 | ||
|
|
33f8ab3800 | ||
|
|
354272315a | ||
|
|
ee3c06a533 | ||
|
|
ab6d34d8ba | ||
|
|
72fcf1310a | ||
|
|
3dd91d548e | ||
|
|
b826d6a43d | ||
|
|
fdbea075fa |
No files matched your search
+344
@@ -0,0 +1,344 @@
|
||||
List of PHP maintainers
|
||||
=======================
|
||||
|
||||
Maintenance legend
|
||||
------------------
|
||||
Supported: Someone is actually paid to look after this.
|
||||
Maintained: Someone actually looks after it.
|
||||
Odd Fixes: It has a maintainer but they don't have time to do
|
||||
much other than throw the odd patch in. See below.
|
||||
Orphan: No current maintainer [but maybe you could take the
|
||||
role as you write your new code].
|
||||
Obsolete: Old code. Something tagged obsolete generally means
|
||||
it has been replaced by a better system and you
|
||||
should be using that.
|
||||
Unknown: Not known at this time.
|
||||
|
||||
Status legend
|
||||
-------------
|
||||
Working: Working under both Windows and Unix.
|
||||
Windows: Working only under Windows.
|
||||
Unix: Working only under Unix.
|
||||
Experimental: Under development or initial release.
|
||||
Not Working: Not working.
|
||||
Unknown: Status unknown.
|
||||
|
||||
|
||||
== Server APIs ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fhttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: isapi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: nsapi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pi3web
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: roxen
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: servlet
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: thttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== Database extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dbase
|
||||
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ingres_ii
|
||||
PRIMARY MAINTAINER: David Hénot <henot@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msql
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Tested on phpts and isapi versions
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysql
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sybase
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Not Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sybase_ct
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Andreas Karajannis <Karajannis@gmd.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working except for persistent connections
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== Other extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aspell
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
COMMENT: For aspell .27 and greater, check out the pspell extension
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: com
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cpdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: CURL
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: domxml
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gettext
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: imap
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcal
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Currently working only with libmcrypt 2.7.7 and earlier
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: posix
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: readline
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: recode
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: swf
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unix (won't change)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
# iptc?
|
||||
@@ -8,12 +8,29 @@ and then a static module. A more verbose explanation follows.
|
||||
Note! Only install either the static module or the dynamic one. Do not
|
||||
install both.
|
||||
|
||||
Note 2! If you are recompiling PHP to add new extensions or upgrading
|
||||
something like GD, remove the config.cache file before you re-run
|
||||
configure.
|
||||
|
||||
Note 3! If you are on Linux and have installed shared libraries, make
|
||||
sure the location of these shared libraries are listed in your
|
||||
/etc/ld.so.conf file. For example, if you have:
|
||||
|
||||
/usr/local/lib/mysql/libmysqlclient.so
|
||||
|
||||
Make sure /etc/ld.so.conf contains:
|
||||
|
||||
/usr/local/lib/mysql
|
||||
|
||||
Then run ldconfig.
|
||||
|
||||
If you want both PHP 3 and 4 modules in the same Apache server, check the
|
||||
bottom of this file for instructions.
|
||||
|
||||
INSTALLATION WITH THE ZEUS WEB SERVER:
|
||||
--Please see the 'README.Zeus' file included in this distribution
|
||||
|
||||
|
||||
QUICK INSTALL (DSO)
|
||||
|
||||
For this to work your Apache httpd must have mod_so enabled.
|
||||
@@ -36,6 +53,9 @@ If you get an error telling you that the apxs script could not be found,
|
||||
look for it on your system and if you find it, provide the full path to it
|
||||
as: --with-apxs=/path/to/apxs
|
||||
|
||||
Next you must copy php.ini-dist to the appropriate place (normally
|
||||
/usr/local/lib/php.ini) and edit it as necessary to set PHP options.
|
||||
|
||||
The only thing left to do is to edit your httpd.conf file and make sure the
|
||||
PHP 4 mime type is there and uncommented. You need a line that looks like
|
||||
this:
|
||||
@@ -64,10 +84,10 @@ $ cd ../apache_1.3.x
|
||||
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
|
||||
(The above line is correct! Yes, we know libphp4.a does not exist at this
|
||||
stage. It isn't supposed to. It will be created.)
|
||||
make
|
||||
$ make
|
||||
(you should now have an httpd binary which you can copy to your Apache bin dir)
|
||||
cd ../php-4.0.x
|
||||
cp php.ini-dist /usr/local/lib/php.ini
|
||||
$ cd ../php-4.0.x
|
||||
$ cp php.ini-dist /usr/local/lib/php.ini
|
||||
You can edit /usr/local/lib/php.ini file to set PHP options.
|
||||
Edit your httpd.conf or srm.conf file and add:
|
||||
AddType application/x-httpd-php .php
|
||||
@@ -263,14 +283,12 @@ Installing PHP can be done in four simple steps:
|
||||
Note! If a line has a # at the beginning, then it is commented out
|
||||
and you need to remove the # for that line to take effect.
|
||||
|
||||
Finally you need to copy php.ini-dist to the appropriate place
|
||||
(normally /usr/local/lib/php.ini) and edit if necessary.
|
||||
|
||||
Once you have made these changes you should be ready to restart your
|
||||
server and try it out. Type: apachectl restart
|
||||
|
||||
The create a test file named test.php in your web tree somewhere and
|
||||
put some test PHP tags in it. <?phpinfo()?> is a good first test.
|
||||
This tag tells PHP to do a braindump and tells you all sorts of things
|
||||
about itself.
|
||||
|
||||
4b. Setting up the server. (Static Module)
|
||||
|
||||
You should now have a new httpd binary. Shut down your existing server,
|
||||
@@ -289,18 +307,71 @@ Installing PHP can be done in four simple steps:
|
||||
Any file ending in .phps will now be displayed with full colour syntax
|
||||
highlighting instead of being executed.
|
||||
|
||||
When you are finished making changes to your httpd.conf file, you can
|
||||
start up your server. Note that on some older server setups, the
|
||||
AddType lines are in the conf/srm.conf file instead of conf/httpd.conf.
|
||||
Note that on some older server setups, the AddType lines are in the
|
||||
conf/srm.conf file instead of conf/httpd.conf.
|
||||
|
||||
Note! If a line has a # at the beginning, then it is commented out
|
||||
and you need to remove the # for that line to take effect.
|
||||
|
||||
When you are finished making changes to your httpd.conf file, you need
|
||||
to copy php.ini-dist to the appropriate place (normally
|
||||
/usr/local/lib/php.ini) and edit if necessary. You can then
|
||||
start up your server.
|
||||
|
||||
USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
|
||||
5. Testing it all worked
|
||||
|
||||
Create a test file named test.php in your web tree somewhere and
|
||||
put some test PHP tags in it. <?phpinfo()?> is a good first test.
|
||||
This tag tells PHP to do a braindump and tells you all sorts of things
|
||||
about itself.
|
||||
|
||||
|
||||
WHY DISABLING -fPIC WORKS ON LINUX
|
||||
|
||||
From: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
|
||||
To: glibc-linux@ricardo.ecn.wfu.edu
|
||||
Subject: Re: Shared library -shared vs. -fpic
|
||||
|
||||
[In reply to Kaz Kylheku <kaz@ashi.footprints.net>]
|
||||
|
||||
> PIC stands for Position-Independent Code.
|
||||
|
||||
Correct.
|
||||
|
||||
> Code isn't position-independent (or ``relocatable'') cannot be
|
||||
> loaded at an arbitrary address;
|
||||
|
||||
Wrong.
|
||||
|
||||
> it requires some references to be patched at load time.
|
||||
|
||||
Correct.
|
||||
|
||||
> Shared libraries need to be relocatable because it's not known
|
||||
> beforehand what address they will be loaded at
|
||||
|
||||
Correct, depending on the meaning of "relocatable". PIC code typically
|
||||
does not contain relocations; that's why its position-independent.
|
||||
|
||||
> Just because you don't specify -fPIC doesn't mean that the compiler
|
||||
> won't emit position-independent code; the option prevents it from
|
||||
> emitting position-dependent code in situations where it otherwise
|
||||
> would.
|
||||
|
||||
Correct. However, a non-trivial shared library typically won't be
|
||||
position-independent unless explicitly compiled with
|
||||
-fPIC. Linux/glibc indeed does not require a shared library to be
|
||||
position-independent; instead, it will perform the relocations in the
|
||||
binary, even if they refer to code pages. As a result, those relocated
|
||||
pages won't be shared across processes, anymore.
|
||||
|
||||
Regards,
|
||||
Martin
|
||||
|
||||
USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
|
||||
|
||||
Recent operating systems provide the ability to perform versioning and
|
||||
scoping. This features make it possible to let PHP3 and PHP4 run as
|
||||
scoping. This features make it possible to let PHP 3 and PHP 4 run as
|
||||
concurrent modules in one Apache server.
|
||||
|
||||
This feature is known to work on the following platforms:
|
||||
@@ -309,7 +380,7 @@ USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
|
||||
- Solaris 2.5 or better
|
||||
- FreeBSD (3.2, 4.0 tested)
|
||||
|
||||
To enable it, configure PHP3 and PHP4 to use APXS (--with-apxs) and the
|
||||
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
|
||||
necessary link extensions (--enable-versioning). Otherwise, all standard
|
||||
installations instructions apply. For example:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 2.01
|
||||
The PHP License, version 2.02
|
||||
Copyright (c) 1999, 2000 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
@@ -37,12 +37,17 @@ are met:
|
||||
"This product includes PHP, freely available from
|
||||
http://www.php.net/".
|
||||
|
||||
6. Permission to freely distribute and use Zend as an integrated
|
||||
part of PHP is granted, under the conditions of version 0.92
|
||||
of the Zend License.
|
||||
The license is bundled with the Zend engine, and is available
|
||||
at http://www.zend.com/license/0_92.txt, or by contacting
|
||||
license@zend.com.
|
||||
6. The software incorporates the Zend Engine, a product of Zend
|
||||
Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the
|
||||
PHP Association (pursuant to a grant from Zend that can be
|
||||
found at http://www.php.net/license/ZendGrant/) for
|
||||
distribution to you under this license agreement, only as a
|
||||
part of PHP. In the event that you separate the Zend Engine
|
||||
(or any portion thereof) from the rest of the software, or
|
||||
modify the Zend Engine, or any portion thereof, your use of the
|
||||
separated or modified Zend Engine software shall not be governed
|
||||
by this license, and instead shall be governed by the license
|
||||
set forth at http://www.zend.com/license/ZendLicense/.
|
||||
|
||||
|
||||
|
||||
|
||||
-105
@@ -1,105 +0,0 @@
|
||||
List of PHP maintainers
|
||||
=======================
|
||||
|
||||
Status legend
|
||||
-------------
|
||||
Supported: Someone is actually paid to look after this.
|
||||
Maintained: Someone actually looks after it.
|
||||
Odd Fixes: It has a maintainer but they don't have time to do
|
||||
much other than throw the odd patch in. See below..
|
||||
Orphan: No current maintainer [but maybe you could take the
|
||||
role as you write your new code].
|
||||
Obsolete: Old code. Something tagged obsolete generally means
|
||||
it has been replaced by a better system and you
|
||||
should be using that.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
STATUS: Odd Fixes
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Odd Fixes
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Odd Fixes
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -1,25 +0,0 @@
|
||||
Module Status
|
||||
------ ------
|
||||
MySQL Working
|
||||
COM Working
|
||||
WDDX Working
|
||||
PCRE Working
|
||||
DBA Working
|
||||
mcrypt Working
|
||||
mhash Working
|
||||
dbase Working
|
||||
aspell Working
|
||||
imap Working
|
||||
ldap Working
|
||||
oci8 Working
|
||||
oracle Working
|
||||
iptc Working
|
||||
informix Working
|
||||
zlib Working
|
||||
sysvshm Working
|
||||
odbc Working (except for persistent connections)
|
||||
MS SQL Working (tested on phpts and isapi versions)
|
||||
snmp Working
|
||||
gettext Working
|
||||
mcal Working
|
||||
interbase Mostly working
|
||||
+14
-20
@@ -1,19 +1,14 @@
|
||||
|
||||
ZEND_DIR = $(srcdir)/Zend
|
||||
SUBDIRS = Zend ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
|
||||
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
|
||||
|
||||
LTLIBRARY_NAME = libphp4.la
|
||||
|
||||
LTLIBRARY_SOURCES = \
|
||||
main.c internal_functions.c snprintf.c php_sprintf.c \
|
||||
configuration-parser.c configuration-scanner.c \
|
||||
safe_mode.c fopen-wrappers.c php_realpath.c alloca.c \
|
||||
php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c strlcpy.c \
|
||||
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c php_virtual_cwd.c
|
||||
LTLIBRARY_SOURCES = stub.c
|
||||
|
||||
LTLIBRARY_DEPENDENCIES = \
|
||||
Zend/libZend.la \
|
||||
sapi/$(PHP_SAPI)/libsapi.la \
|
||||
main/libmain.la \
|
||||
$(REGEX_LIB) \
|
||||
$(EXT_LTLIBS) \
|
||||
$(TSRM_LIB)
|
||||
@@ -21,13 +16,13 @@ LTLIBRARY_DEPENDENCIES = \
|
||||
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
|
||||
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
|
||||
|
||||
PROGRAM_NAME = $(PHP_PROGRAM)
|
||||
PROGRAM_NAME = php
|
||||
PROGRAM_SOURCES = stub.c
|
||||
PROGRAM_LDADD = libphp4.la
|
||||
PROGRAM_LDFLAGS = -export-dynamic
|
||||
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
|
||||
|
||||
targets = $(LTLIBRARY_NAME) $(PROGRAM_NAME)
|
||||
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
|
||||
|
||||
install_targets = install-sapi install-modules
|
||||
|
||||
@@ -38,6 +33,14 @@ include $(top_srcdir)/build/program.mk
|
||||
install-sapi:
|
||||
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
-@$(mkinstalldirs) $(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
$(INSTALL_IT)
|
||||
|
||||
install-modules:
|
||||
@@ -45,18 +48,9 @@ install-modules:
|
||||
$(mkinstalldirs) $(moduledir) && \
|
||||
echo "installing shared modules into $(moduledir)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(moduledir) || true
|
||||
cp modules/* $(moduledir) >/dev/null 2>&1 || true
|
||||
|
||||
install-su: install-modules
|
||||
(cd pear && $(MAKE) install)
|
||||
|
||||
configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
|
||||
$(YACC) -p cfg -v -d $< -o configuration-parser.c
|
||||
|
||||
configuration-scanner.c: $(srcdir)/configuration-scanner.l
|
||||
$(LEX) -Pcfg -o$@ -i $<
|
||||
|
||||
internal_functions.c: internal_functions.c.in config.status
|
||||
CONFIG_FILES= CONFIG_HEADERS= ./config.status
|
||||
|
||||
.NOEXPORT:
|
||||
@@ -1,7 +1,289 @@
|
||||
PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
?? ??? 2000, Version 4.0.0 Release
|
||||
?? ??? 2000, Version 4.0.2
|
||||
- Fixed warning when shutting down OCINLogon() connections. (Thies)
|
||||
- Fixed \n in session variables bug on Win32 (Stas)
|
||||
- OCIError() would sometimes not report failed connections. (Thies)
|
||||
- Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
|
||||
the status code across the redirect as well. (Rasmus)
|
||||
- Add Olympus-specific tags to read_exif_data() (Rasmus)
|
||||
- Fixed bug in imap_fetchheader() where using FT_PREFETCHTEXT didn't return
|
||||
the body. Bug #4447. (Jani)
|
||||
- Fixed exec() returning "\0" when output is empty
|
||||
- Added XML_Parser class in PEAR (Stig)
|
||||
- Added "make test" target in pear/ and added some regression tests (Stig)
|
||||
- Fix bug in strip_tags function as per bug #5857 (Rasmus)
|
||||
- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
|
||||
- Improved the output-buffering functions to be re-entrant (Zeev)
|
||||
- Made ldap_add(), ldap_modify(), ldap_mod_add(), ldap_mod_replace()
|
||||
binary-safe. Original patch: Terrence Miao <terrence_miao@email.com> (Jani)
|
||||
- CGI aka. command line version has now an option '-l' for syntax check
|
||||
without execution (Hartmut)
|
||||
- Fixed bug in ldap_get_values_len() which makes it NULL-safe. (Jani)
|
||||
- Bug-report and fix submitted by Michel Alexeline <alexel@dr15.cnrs.fr>
|
||||
- Make ext_skel create a Makefile.in set up to handle shared extension
|
||||
support automatically (Rasmus)
|
||||
- Fix php_realpath not to die on non-existing files (needed for touch()) (Stas and china@thewrittenword.com)
|
||||
- Fix get_browser() function (Stas)
|
||||
- Fix symbol clash which caused a DSO problem on OpenBSD (Rob Black and
|
||||
anil@recoil.org)
|
||||
- Added new function: ldap_compare(). (Jani)
|
||||
- Fixed a bug in ldap_get_entries() and ldap_get_attributes(). (Jani)
|
||||
- Ported DB to new error reporting scheme in PEAR. (Stig)
|
||||
- Added sybase and ibase DB backends in PEAR. (Sterling)
|
||||
- New PEAR package Payment_Verisign for use with the Payflow Pro
|
||||
(pfpro) extension. (David Croft)
|
||||
- Added CURL support. (Sterling)
|
||||
- Catch users trying to set "compatibility" parameter in PDF, which is not
|
||||
supported from user-land. (Joey)
|
||||
- Fixed dbase_add_record. (Sterling)
|
||||
- Added new function wordwrap() to wordwrap long strings from Chris
|
||||
Russel <russel@yorku.ca> (David Croft)
|
||||
- Added four additional arguments: attrsonly, sizelimit, timelimit, deref which
|
||||
were missing in ldap_search(), ldap_list() and ldap_read() functions (Jani)
|
||||
- Fixed a bug in ldap_search/list/read() which prevented returning the partial
|
||||
results when 'Sizelimit exceeded' error occurred. (Jani Taskinen)
|
||||
- Fixed preg_replace() to automatically escape quotes in matched
|
||||
strings when using /e modifier. (Andrei)
|
||||
- Itanium patch (Steve Robb)
|
||||
- Set default include_path so PEAR files can be reached (Stig)
|
||||
- Added "pear" executable, requires CGI version installed (Stig)
|
||||
- Added extension ii for Ingres II native support. See README in ext/ingres_ii
|
||||
directory. (David H)
|
||||
- Added Win32 project for the Interbase module (Zeev)
|
||||
- Added ability to perform calls to the parent class without explicitly
|
||||
specifying its name, using parent::func_name(...) (Zeev, Zend Engine)
|
||||
- You can now call Ora_Error() without prameters to get the reason
|
||||
for a failed connection attempt. (Kirill Maximov)
|
||||
- New extension "pfpro" for interface with Verisign Payflow Pro (David Croft)
|
||||
- Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
|
||||
imagetypes() function (Rasmus)
|
||||
- Add ImageTypes() function which returns a bitfield with the supported
|
||||
image formats. 1=gif, 2=jpeg, 4=png and 8=wbmp (Rasmus)
|
||||
- Make it possible to specify an empty string as a thousands-seperator
|
||||
in number_format() (Rasmus)
|
||||
- Shared module support for LDAP extension (Troels Arvin)
|
||||
- Fixed a bug with imap_mail where apache would segfault if the rpath
|
||||
parameter was specified.
|
||||
- Use dashes and short day name in cookies since some browsers seem picky
|
||||
about this (Rasmus)
|
||||
- Added pspell module. (Vlad)
|
||||
- Added 3 additional arguments to the user-defined error handler - the file
|
||||
name and line number in which the error occured, and the context (local
|
||||
variables) of the code in which the error occured (Zeev, Zend Engine)
|
||||
- Improved the error handling code to handle an error in a user-defined error
|
||||
handling function (Zeev, Zend Engine)
|
||||
- Fixed leak when using string offsets in the array() construct.
|
||||
(Andi, Zend Engine)
|
||||
- Fixed corruption problem when changing deeply nested values in objects.
|
||||
(Andi & Zeev, Zend Engine)
|
||||
- Improved array_multisort() to be able to specify sort type as well sort
|
||||
order. Incidentally, it can be used to sort multi-dimensional arrays
|
||||
as well. (Andrei)
|
||||
- Fixed a possible data corruption in case of a huge amount of aborted requests
|
||||
(Zeev)
|
||||
- Apache module would sometimes close a wrong file-descriptor. (Sascha)
|
||||
- Fixed use of alternative storage handlers in the session module. (Sascha)
|
||||
- Updated str_pad() to be able to pad on left/right/both sides. (Andrei)
|
||||
- Fixed crash in gzopen(). (Thies)
|
||||
- Multiple character set support in gdttf.c (Rob Goodwin)
|
||||
- When using HTTP auth from PHP, fill in the %u custom log field so the
|
||||
authenticated used id will get logged in the Apache access_log (Rasmus)
|
||||
- Support for pdflib 3.01. (Uwe)
|
||||
- FDF Data is handled properly and can be accessed by reading
|
||||
HTTP_RAW_POST_DATA. (Uwe)
|
||||
- Added new 'O' format modifier that will output the GMT offset as "[+-]HHMM"
|
||||
(eg: Pacific time is -0700). This is useful for things such as Date: mail
|
||||
headers. (Mike W)
|
||||
- Fixed crash on OCI?Logon() failure. (Thies)
|
||||
- Make the special Header("http/...") response be case insensitive like 3.0
|
||||
(Rasmus)
|
||||
- Allow cybercash to compile as a DL module. (Sterling)
|
||||
- Fixed the dbase_create function. (Sterling)
|
||||
- Fixed a problem under some versions of Windows that could cause PHP to hang
|
||||
on startup if errors occured, e.g. in the php.ini file (Zeev)
|
||||
- Fixed opendir() again. It should actually work well continuously now (Zeev)
|
||||
- Added three additional arguments to be sent to a user-defined error handler -
|
||||
the filename and line number in which the error occured, and the context
|
||||
(the local variables) of the error (Zeev, Zend Engine)
|
||||
- Improved the error handling code to handle an error in a user-defined error
|
||||
handling function (Zeev, Zend Engine)
|
||||
- Added an optional parameter to preg_replace() that can be used to
|
||||
specify how many replacements to make. (Andrei)
|
||||
|
||||
28 Jun 2000, Version 4.0.1
|
||||
- Fixed a possible crash in the LDAP modify code. (Eric Kilfoil)
|
||||
- Fixed a bug in opendir(), which prevented readdir() from working properly if
|
||||
the $dir argument wasn't explicitly specified (Zeev)
|
||||
- Made --enable-discard-path work again. (Andi)
|
||||
- Removed 8KB limit on line length of the file() function (Zeev)
|
||||
- Disabled dl() when PHP is being used as a module inside a multithreaded web
|
||||
server - it didn't work before, and caused weird results (Zeev)
|
||||
- Added the ImageColorClosestHWB(), ImageCopyMerge() and ImagePaletteCopy()
|
||||
functions. (Sterling)
|
||||
- Added ImageCreateFromWBMP() function. (Jouni)
|
||||
- Fixed problems with POST requests under the NSAPI module. (Roberto Biancardi)
|
||||
- Added spliti() function. (Thies)
|
||||
- Fixed serializer behaviour with regards to serializing objects whose class
|
||||
definition was not available in the deserializing context. (Sascha)
|
||||
- Improve memory cache performance and increase cache size. (Stas, Zend Engine)
|
||||
- Added a crc32 checksum function - used by the UdmSearch search engine
|
||||
and currently run through a system call. This will speed up the UdmSearch
|
||||
php frontend significantly. (Rasmus)
|
||||
- Modified in_array() to not touch array pointer. (Andrei)
|
||||
- Added restore_error_handler(). (Zeev, Zend engine)
|
||||
- Fixed erroneous file names and line numbers in error situations under the
|
||||
multithreaded version of PHP - most noticeably Win32 (Zeev, Zend Engine)
|
||||
- Fixed problem with CGI crashing on certain servers especially Windows Apache
|
||||
& O'Reilly website (Andi)
|
||||
- Added Pi3Web SAPI module; run ./configure --with-pi3web to enable this.
|
||||
(Holger; zimpel@t-online.de)
|
||||
- Enhanced WDDX functions to call __sleep() and __wakeup() when working on
|
||||
objects. (Andrei)
|
||||
- Changed WDDX to serialize arrays as structs only if needed. (Thies)
|
||||
- Implemented max_execution_time under Win32 (Zeev)
|
||||
- Updated strtotime() to handle many more formats. It now has complete
|
||||
feature parity with GNU date command. (Andrei)
|
||||
- Added support for multiple arguments in unset(). (Faisal, Zend Engine)
|
||||
- Functions that expect a resource but are passed something else now return
|
||||
NULL instead of FALSE. (Thies, Zend Engine)
|
||||
- Fixed gmmktime(), on certain systems it incorrectly adjusted for the timezone
|
||||
offset and daylight savings time. (Andrei)
|
||||
- Moved VC++ Win32 project and workspace files to the win32 directory
|
||||
(Zeev)
|
||||
- Fixed checkdate() to not return true on non-numeric arguments (Rasmus)
|
||||
- Added --enable-c9x-inline option for compilers which support the new C9x
|
||||
standard. If you encounter undefined references to i_zend_is_true and
|
||||
other symbols, you should enable this. (Sascha, Zend Library)
|
||||
- Fixed a problem in ldap_add() and ldap_modify(), sometimes added trailing
|
||||
garbage to the values (Stig Venaas)
|
||||
- Fixed a problem with dbmopen() not handing 'c' correctly with dbm/db/ndbm
|
||||
databases. (JimJag)
|
||||
- Fixed a crash in number_format() when used with locales. (Andrei)
|
||||
- Fixed an initialization problem in the MS-SQL problem that could cause
|
||||
a crash in mssql_query() (Zeev)
|
||||
- Upgraded PCRE to version 3.2 and fixed a bug when anchored pattern
|
||||
matched an empty string. (Andrei)
|
||||
- Fixed a bug that prevented PHP from paying attention to the extension_dir
|
||||
directive with extensions that were loaded from the php.ini file (Zeev)
|
||||
- Changed set_error_handler() to return the name of the previously defined
|
||||
error handler, if any (Zeev, Zend Engine)
|
||||
- Declared <?php_track_vars?> officially dead. It didn't work in PHP 4.0.0
|
||||
either, but now it's gone for good (Zeev)
|
||||
- Make convert_cyr_string() binary safe and stop it from corrupting other
|
||||
PHP variables. (Andi)
|
||||
- Added functions array_unique, array_intersect and array_diff (Stig Venaas)
|
||||
- Fixed problem when using uninitialized values in comparisons with strings.
|
||||
They behave as empty strings again just like in PHP 3.
|
||||
(Andi & Zeev, Zend Engine)
|
||||
- Fixed 'Z' flag in date() to adjust for daylight savings time. (Andrei)
|
||||
- Fixed var_dump() not to modify the internal order of array elements (Zeev)
|
||||
- Fixed stripcslashes() to remove to strip \ in unknown escapes instead of
|
||||
leaving it. (Andrei)
|
||||
- Changed WDDX to always serialize arrays as structs. (Andrei)
|
||||
- Fixed include_once() to issue a warning in case the supplied file name is
|
||||
not found (Zeev, Zend Engine)
|
||||
- Fixed a bug in get_declared_classes() which could return the same class
|
||||
multiple times under certain circumstances (Zeev, Zend Engine)
|
||||
- Fixed a bug in rawurldecode() that would cause in rawurldecode() corrupting
|
||||
its argument (Zeev)
|
||||
- Parse errors (or other errors) in the php.ini files under Windows will no
|
||||
longer mess up the HTTP headers in CGI mode and are now displayed in a
|
||||
message box (Zeev)
|
||||
- Fixed a crash in OCIFetchStatement() when trying to read after all data
|
||||
has already been read. (Thies)
|
||||
- fopen_wrappers() are now extensible via modules (Hartmut Holzgraefe)
|
||||
- Make trim strip \0 to match php 3 (Rasmus)
|
||||
- Added function imagecreatefromxbm(). (Jouni)
|
||||
- Added function imagewbmp(). (Jouni, based on patch from Rune Nordbøe
|
||||
Skillingstad)
|
||||
- Added str_pad() for padding a string with an arbitrary string on left or
|
||||
right. (Andrei)
|
||||
- Made the short_tags, asp_tags and allow_call_time_pass_reference INI
|
||||
directives work on a per-directory basis as well, e.g. from .htaccess
|
||||
files. (Zeev)
|
||||
- Added fflush() function. (Eric Huss)
|
||||
- Fixed a problem with static variables, default function arguments and class
|
||||
member variables, that contained array values. (Andi & Zeev, Zend Engine)
|
||||
- Fix virtual() when used with output buffering (Marc Pohl)
|
||||
- Clean up constants in flock() function and add optional 3rd arg which
|
||||
is set to true on EWOULDBLOCK (Rasmus)
|
||||
- Added functions pg_loimport(), pg_loexport(). (Jouni)
|
||||
- Added SWF support to getimagesize() function (Derick Rethans)
|
||||
- Added support for both indexed and non-indexed arrays of file uploads
|
||||
eg. name="file[]" type="file" (Rasmus)
|
||||
- Added create_function(), which gives the ability to create functions
|
||||
on-the-fly (Zeev, Zend Engine)
|
||||
- Added support for comparisons of arrays (with arrays) and objects (with
|
||||
objects); The equality operator (==) performs an unordered comparison,
|
||||
whereas the identity operator (===) performs an ordered comparison (Zeev,
|
||||
Zend Engine)
|
||||
- Allow all functions that receive user-defined function callbacks to accept
|
||||
an array that contains an object and a method name, in place of a function
|
||||
name, e.g. usort($array, array($obj, "ObjSort")) (Zeev, Zend Engine)
|
||||
- Added set_error_handler() to allow custom error handling functions,
|
||||
instead of the built-in error handling code (Zeev, Zend Engine)
|
||||
- Renamed user_error() to trigger_error(); user_error() remains
|
||||
defined for compatibility (Zeev, Zend Engine)
|
||||
- Fix the global/static statements to require a trailing terminating
|
||||
semi-colon ';'. (Andi, Zend Engine)
|
||||
- Cleaned up PCRE extension and made it binary-safe. (Andrei)
|
||||
- Added third argument to in_array(). If it's true, then in_array()
|
||||
will use strict comparison instead of the default one. (Andrei)
|
||||
- Added pg_trace() and pg_untrace (Dominic J. Eidson & Zeev)
|
||||
- ignore_user_abort=Off is now default. (Thies)
|
||||
- Added array_merge_recursive() that will recursively merge values
|
||||
under the same keys. (Andrei)
|
||||
- fixed crash in OCIParse when parsing invalid SQL. (Thies)
|
||||
- Fixed a bug in mysql_connect() that made it ignore the socket argument, in
|
||||
case of non-persistent connects (Zeev)
|
||||
- Added disable_functions php.ini directive, to allow administrators to disable
|
||||
certain functions for security reasons (Zeev)
|
||||
- Fixed sessions on Win32. When setting the directory depth parameter in
|
||||
save_path you need to now delimit it with a ';' instead of ':', e.g
|
||||
"5;/tmp" instead of "5:/tmp" (Andi)
|
||||
- Changed the Apache handler's return status to 'Declined' when a requested
|
||||
PHP file could not be found. Returning 'Not Found' caused problems
|
||||
in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES
|
||||
was not getting set at all. Moving to 'Declined' should fix this and I
|
||||
can't see any other side effects. (Rasmus)
|
||||
- Fixed scanning decimal numbers in internationalized environments. They should
|
||||
always be in standard US format e.g. 23.3. (Andi, Zend Engine)
|
||||
- Added second argument to preg_quote() which allows quoting of
|
||||
one additional character, usually the regex delimiter. (Andrei)
|
||||
- Uncommitted outstanding OCI8 transactions are now rolled back
|
||||
before the connection is closed. (Thies)
|
||||
- ignore_user_abort() & friends should now work in CGI mode as well.
|
||||
(Patch by daniel.braun@ercom.fr)
|
||||
- Added extension YAZ (dickmeiss).
|
||||
- Fixed a crash bug triggered by certain cases of class redeclarations
|
||||
(Stanislav & Zeev, Zend Engine)
|
||||
- Fixed min()/max() segfault. (Andrei)
|
||||
- New module for reading EXIF header data from JPEG files. Most digital
|
||||
cameras will embed all sorts of information about a picture inside the
|
||||
jpeg images it generates. (Rasmus)
|
||||
- Fixed basename() bug where "file.ext///" would not return the same
|
||||
as "/path/file.ext///" (Rasmus)
|
||||
- Added the swf_ortho function. (Sterling)
|
||||
- Moved to virtual current working directory support. This highly improves the
|
||||
functionality and stability of multi-threaded versions of PHP (Andi, Sascha)
|
||||
|
||||
22 May 2000, Version 4.0.0 Release
|
||||
- Allow the writing of flash files to stdout.
|
||||
- Fixed a crash bug in .phps syntax-highlighted files (Andi)
|
||||
- Improved round() to allow specification of rounding precision.
|
||||
(Andrei, Todd Kirby <kirbyt@yahoo.com>)
|
||||
- Added SORT_REGULAR, SORT_NUMERIC, SORT_STRING flags that can be used with
|
||||
non-user sort functions for precise sorting behavior. (Andrei)
|
||||
- Fixed two 64-bit issues (startup crash, gethostbyaddr). (Sascha)
|
||||
- NULL values are now preserved in the return value of mysql_fetch_array()
|
||||
and mysql_fetch_object(). (Andrei)
|
||||
- Ported InterBase module finally from PHP 3 to PHP 4. Full support for
|
||||
InterBase 6. (Jouni)
|
||||
- Added swf_definepoly for drawing polygons to the SWF functions. (Sterling)
|
||||
- Ported imagegammacorrect from PHP3 to PHP4. (Sterling)
|
||||
- Added array_rand() function. (Andrei)
|
||||
|
||||
8 May 2000, Version 4.0 Release Candidate 2
|
||||
- NSAPI WIN32 Module compilable, untested (Shane)
|
||||
@@ -18,7 +300,7 @@ PHP 4.0 NEWS
|
||||
- ImagePolygon() is no longer limited by a maximum number of polygons.
|
||||
(Marc Pohl)
|
||||
- Added configure time checking for bcmath package. (Joey, Sascha)
|
||||
- Added get_declared_classes(). (Andrei, Zend library)
|
||||
- Added get_declared_classes(). (Andrei, Zend Engine)
|
||||
- Add initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
|
||||
- Added the SWF module which allows you to create Macromedia Flash files via
|
||||
libswf. (Sterling)
|
||||
@@ -28,7 +310,7 @@ PHP 4.0 NEWS
|
||||
- Fixed a crash in array_multisort() that happened when empty arrays
|
||||
were passed to it. (Andrei)
|
||||
- Added substr_count() from Peter Kovacs. (Andrei)
|
||||
- Add an optional third argument to fseek to indicate were to seek from.
|
||||
- Add an optional third argument to fseek to indicate where to seek from.
|
||||
(Andrei)
|
||||
- OCIBindByName() will no longer complain about bindlength beeing zero. (Thies)
|
||||
- Converted the IMAP module to the high performance API (Zeev)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ Having said that, here are the organizational rules:
|
||||
|
||||
2. Discuss any significant changes on the list before committing.
|
||||
|
||||
3. Look at MAINTANERS file to see who is the primary maintainer of
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
|
||||
WHAT IT IS
|
||||
|
||||
It's a tool for automatically creating the basic framework for a PHP module
|
||||
and writing C code handling arguments passed to your functions from a simple
|
||||
configuration file. See an example at the end of this file.
|
||||
|
||||
HOW TO USE IT
|
||||
|
||||
Very simple. First, cd do directory ext/ in PHP 4 sources. If you just need
|
||||
the basic framework and will be writing all the code in your functions
|
||||
yourself, you can now do
|
||||
|
||||
./ext_skel --extname=module_name
|
||||
|
||||
and everything you need is placed in directory module_name. In fact, if you
|
||||
don't need to test the existence of any external header files, libraries or
|
||||
functions in them, the module is already almost ready to be compiled in PHP.
|
||||
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
|
||||
sources top directory, and do
|
||||
|
||||
./buildconf; ./configure --enable-module_name; make
|
||||
|
||||
But if you already have planned the overall scheme of your module, what
|
||||
functions it will contain, their return types and the arguments they take
|
||||
(a very good idea) and don't want to bother yourself with creating function
|
||||
definitions and handling arguments passed yourself, it's time to create a
|
||||
function definitions file, which you will give as an argument to ext_skel
|
||||
with option
|
||||
|
||||
--proto=filename.
|
||||
|
||||
FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
|
||||
All the definitions must be on one line. In it's simplest form, it's just
|
||||
the function name, ie.
|
||||
|
||||
my_function
|
||||
|
||||
but then you'll be left with an almost empty function body without any
|
||||
argument handling.
|
||||
|
||||
Arguments are given in parenthesis after the function name, and are of
|
||||
the form 'argument_type argument_name'. Arguments are separated from each
|
||||
other with a comma and optional space. Argument_type can be one of int,
|
||||
bool, double, float, string, array, object or mixed.
|
||||
|
||||
An optional argument is separated from the previous by an optional space,
|
||||
then '[' and of course comma and optional space, like all the other
|
||||
arguments. You should close a row of optional arguments with same amount of
|
||||
']'s as there where '['s. Currently, it does not harm if you forget to do it
|
||||
or there is a wrong amount of ']'s, but this may change in the future.
|
||||
|
||||
An example:
|
||||
|
||||
my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
|
||||
|
||||
Arguments arg3 and arg4 are optional.
|
||||
|
||||
If possible, the function definition should also contain it's return type
|
||||
in front of the definition. It's not actually used for any C code generating
|
||||
purposes but PHP in-source documentation instead, and as such, very useful.
|
||||
It can be any of int, double, string, bool, array, object, resource, mixed
|
||||
or void.
|
||||
|
||||
The file must contain nothing else but function definitions, no comments or
|
||||
empty lines.
|
||||
|
||||
OTHER OPTIONS
|
||||
|
||||
--no-help
|
||||
|
||||
By default, ext_skel creates both comments in the source code and a test
|
||||
function to help first time module writers to get started and testing
|
||||
configuring and compiling their module. This option turns off all such things
|
||||
which may just annoy experienced PHP module coders. Especially useful with
|
||||
|
||||
--stubs=file
|
||||
|
||||
which will leave out also all module specific stuff and write just function
|
||||
stubs with function value declarations and passed argument handling, and
|
||||
function entries and definitions at the end of the file, for copying and
|
||||
pasting into an already existing module.
|
||||
|
||||
--assign-params
|
||||
--string-lens
|
||||
|
||||
By default, function proto 'void foo(string bar)' creates the following:
|
||||
...
|
||||
zval **bar;
|
||||
... (zend_get_parameters_ex() called in the middle...)
|
||||
convert_to_string_ex(bar);
|
||||
|
||||
Specifying both of these options changes the generated code to:
|
||||
...
|
||||
zval **bar_arg;
|
||||
int bar_len;
|
||||
char *bar = NULL;
|
||||
... (zend_get_parameters_ex() called in the middle...)
|
||||
convert_to_string_ex(bar_arg);
|
||||
bar = Z_STRVAL_PP(bar_arg);
|
||||
bar_len = Z_STRLEN_PP(bar_arg);
|
||||
|
||||
You shouldn't have to ask what happens if you leave --string-lens out. If you
|
||||
have to, it's questionable whether you should be reading this document.
|
||||
|
||||
--with-xml[=file]
|
||||
|
||||
Creates the basics for phpdoc .xml file.
|
||||
|
||||
--full-xml
|
||||
|
||||
Not implemented yet. When or if there will ever be created a framework for
|
||||
self-contained extensions to use phpdoc system for their documentation, this
|
||||
option enables it on the created xml file.
|
||||
|
||||
CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
|
||||
|
||||
Only arguments of types int, bool, double, float, string and array are
|
||||
handled. For other types you must write the code yourself. And for type
|
||||
mixed, it wouldn't even be possible to write anything, because only you
|
||||
know what to expect.
|
||||
|
||||
It can't handle correctly, and probably never will, variable list of
|
||||
of arguments. (void foo(int bar [, ...])
|
||||
|
||||
Don't trust too much the generated code. It tries to be useful in most of
|
||||
the situations you might encounter, but automatic code generating will never
|
||||
beat a programmer who knows the real situation at hand. ext_skel is generally
|
||||
best suited for quickly generating a wrapper for c-library functions you
|
||||
might want to have available in PHP too.
|
||||
|
||||
This program doesn't have a --help option. It has --no-help instead.
|
||||
|
||||
EXAMPLE
|
||||
|
||||
The following _one_ line
|
||||
|
||||
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
|
||||
will create this function definition for you (note that there are a few
|
||||
question marks to be replaced by you, and you must of course add your own
|
||||
value definitions too):
|
||||
|
||||
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color])
|
||||
*/
|
||||
PHP_FUNCTION(my_drawtext)
|
||||
{
|
||||
zval **image, **text, **font, **x, **y, **color;
|
||||
int argc;
|
||||
int image_id = -1;
|
||||
int font_id = -1;
|
||||
???LS_FETCH();
|
||||
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
|
||||
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
|
||||
|
||||
switch (argc) {
|
||||
case 6:
|
||||
convert_to_long_ex(color);
|
||||
/* Fall-through. */
|
||||
case 5:
|
||||
convert_to_long_ex(y);
|
||||
convert_to_long_ex(x);
|
||||
/* font: fetching resources already handled. */
|
||||
convert_to_string_ex(text);
|
||||
/* image: fetching resources already handled. */
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
php_error(E_WARNING, "my_drawtext: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -14,6 +14,19 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
|
||||
We will describe now how to create these and how to put things
|
||||
together.
|
||||
|
||||
PREPARING YOUR SYSTEM
|
||||
|
||||
While the result will run on any system, a developer's setup needs these
|
||||
tools:
|
||||
|
||||
GNU autoconf
|
||||
GNU automake
|
||||
GNU libtool
|
||||
GNU m4
|
||||
|
||||
All of these are available from
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/
|
||||
|
||||
CONVERTING AN EXISTING EXTENSION
|
||||
|
||||
@@ -69,7 +82,7 @@ CREATING THE MAKEFILE TEMPLATE
|
||||
LTLIBRARY_SHARED_NAME = foobar.la
|
||||
LTLIBRARY_SOURCES = foo.c bar.c
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
LTLIBRARY_SHARED_NAME specifies the name of the extension.
|
||||
@@ -93,17 +106,27 @@ CREATING THE M4 CONFIGURATION FILE
|
||||
PHP_ARG_ENABLE(foobar,whether to enable foobar,
|
||||
[ --enable-foobar Enable foobar])
|
||||
|
||||
PHP_EXTENSION(foobar, $ext_shared)
|
||||
if test "$PHP_FOOBAR" != "no"; then
|
||||
PHP_EXTENSION(foobar, $ext_shared)
|
||||
fi
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
PHP_ARG_ENABLE will automatically set the correct variables, so
|
||||
that the extension will be enabled by PHP_EXTENSION in shared mode.
|
||||
|
||||
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
|
||||
plan to distribute your module with PHP, these facilities allow you
|
||||
to integrate your module easily into the main PHP module framework.
|
||||
|
||||
CREATING SOURCE FILES
|
||||
|
||||
[You are currently alone here. There are a lot of existing modules,
|
||||
use a simply module as a starting point and add your own code.]
|
||||
ext_skel can be of great help when creating the common code for all modules
|
||||
in PHP for you and also writing basic function definitions and C code for
|
||||
handling arguments passed to your functions. See README.EXT_SKEL for further
|
||||
information.
|
||||
|
||||
As for the rest, you are currently alone here. There are a lot of existing
|
||||
modules, use a simple module as a starting point and add your own code.
|
||||
|
||||
|
||||
CREATING THE SELF-CONTAINED EXTENSION
|
||||
@@ -126,4 +149,26 @@ INSTALLING A SELF-CONTAINED EXTENSION
|
||||
$ ./configure \
|
||||
[--with-php-config=/path/to/php-config]
|
||||
$ make install
|
||||
|
||||
|
||||
ADDING SHARED MODULE SUPPORT TO A MODULE
|
||||
|
||||
In order to be useful, a self-contained extension must be loadable
|
||||
as a shared module. I will explain now how you can add shared module
|
||||
support to an existing module called foo.
|
||||
|
||||
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
|
||||
automatically be able to use --with-foo=shared or
|
||||
--enable-foo=shared.
|
||||
|
||||
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
|
||||
building the extension.
|
||||
|
||||
3. Add the following line to Makefile.in:
|
||||
|
||||
LTLIBRARY_SHARED_NAME = foo.la
|
||||
|
||||
4. Add the following lines to your C source file:
|
||||
|
||||
#ifdef COMPILE_DL_FOO
|
||||
ZEND_GET_MODULE(foo)
|
||||
#endif
|
||||
+16
-1
@@ -51,9 +51,21 @@ that you wish to run PHP on:
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
*) Why does the compile fail at Zend/zend-scanner-cc.cc
|
||||
or Zend/zend-parser.c ?
|
||||
|
||||
These source files are auto-generated from the corresponding .y files.
|
||||
The default distribution of PHP contains pre-generated versions of these
|
||||
files that have caused problems for some people. The simplest solution is
|
||||
to delete the files. They will then be rebuilt correctly. You must have the
|
||||
following GNU tools to do this:
|
||||
|
||||
bison 1.28 or later
|
||||
flex 2.5.4 or later
|
||||
|
||||
*) Why does my PHP library fail to load?
|
||||
|
||||
After configuring Zeus, if you get a '502 Bad Gatway' error when
|
||||
After configuring Zeus, if you get a '502 Bad Gateway' error when
|
||||
accessing a PHP page, there are problems loading the PHP
|
||||
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
|
||||
|
||||
@@ -81,6 +93,9 @@ Ensure you run ./configure with the `--enable-libgcc' parameter. You
|
||||
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
|
||||
your gcc installation)
|
||||
|
||||
FreeBSD 4.0:
|
||||
Some people may find they need to run ./configure with the
|
||||
'--enable-libgcc' compile option too.
|
||||
|
||||
|
||||
For more information and help with Zeus, please visit our website:
|
||||
|
||||
@@ -9,6 +9,7 @@ Zend
|
||||
|
||||
global
|
||||
------
|
||||
* make everything on the language-level independent of your locale setings.
|
||||
* always build the standalone executable as well as the chosen SAPI
|
||||
target.
|
||||
* make sure all source files have the "right" copyright.
|
||||
@@ -35,6 +36,8 @@ global
|
||||
available in ZTS mode.
|
||||
* add aliases to functions to conform to new naming conventions, e.g.
|
||||
str_to_upper().
|
||||
* see what functions might need to be changed to use HashPosition, so
|
||||
that the internal array pointer is not affected.
|
||||
|
||||
documentation
|
||||
-------------
|
||||
@@ -53,24 +56,43 @@ ext/oci8
|
||||
--------
|
||||
* all OCIFetch*() functions should return 0 for no more data and false on error.
|
||||
* have a flag that trims trailing spaces from CHAR fields on retrieval.
|
||||
* make allow_call_time_pass_reference=Off working.
|
||||
|
||||
ext/pcre
|
||||
--------
|
||||
* have a non-greedy option for preg_replace().
|
||||
* have an option for preg_grep() to return keys as well.
|
||||
* update the online docs from version 3.1 man page
|
||||
|
||||
ext/session
|
||||
-----------
|
||||
* implement a call to set a session read-only to overcome
|
||||
the need to serialize frame-loads.
|
||||
* maybe implement finer-grained session variables that could be
|
||||
locked individually.
|
||||
* write a network-transparent storage back-end with fallover
|
||||
facilities
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
* add a version number to data serialized via serialize().
|
||||
* array_add(), array_rand(), array_uniq(). (Andrei)
|
||||
* implement pathinfo() (what the heck is it?)
|
||||
* array_add(). (Andrei)
|
||||
* implement pathinfo()
|
||||
$a = pathinfo("/some/file.bla");
|
||||
|
||||
=> array("dirname" => "/some/",
|
||||
"basename" => "file.bla",
|
||||
"extension" => "bla");
|
||||
|
||||
|
||||
We could also make it return just one part as a sting if used
|
||||
like this:
|
||||
|
||||
$a = pathinfo("/some/file.bla", PATHINFO_BASENAME);
|
||||
|
||||
* possibly modify parsing of GPC data to automatically create arrays if
|
||||
variable name is seen more than once.
|
||||
* implement regex-cache for url-functions.
|
||||
* strpad(). (Andrei)
|
||||
* strcase_replace(). (Andrei)
|
||||
* comparing arrays semantically (like Python). (Andrei)
|
||||
* move socket related functions to fsock.c.
|
||||
* get_defined_funcs(), get_defined_vars().
|
||||
* NOT binary safe:
|
||||
@@ -83,7 +105,6 @@ ext/standard
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
* implement __sleep() and __wakeup() the way serialize()/unserialize() do.
|
||||
* See if we can support the remaining datatypes:
|
||||
dateTime
|
||||
binary
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
Copyright (c) 1999,2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Neither name of the copyright holders nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 THE COPYRIGHT HOLDERS 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.
|
||||
+7
-3
@@ -13,7 +13,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "TSRM.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -207,13 +206,18 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
|
||||
|
||||
/* fetches the requested resource for the current thread */
|
||||
void *ts_resource(ts_rsrc_id id)
|
||||
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
{
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
THREAD_T thread_id;
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
void *resource;
|
||||
|
||||
if (th_id) {
|
||||
thread_id = *th_id;
|
||||
} else {
|
||||
thread_id = tsrm_thread_id();
|
||||
}
|
||||
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_DEBUG"
|
||||
# ADD RSC /l 0x40d /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -65,7 +65,7 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -88,7 +88,7 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
||||
+5
-4
@@ -14,8 +14,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _TSRM_H
|
||||
#define _TSRM_H
|
||||
#ifndef TSRM_H
|
||||
#define TSRM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# undef PACKAGE
|
||||
@@ -81,7 +81,8 @@ TSRM_API void tsrm_shutdown(void);
|
||||
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
|
||||
|
||||
/* fetches the requested resource for the current thread */
|
||||
TSRM_API void *ts_resource(ts_rsrc_id id);
|
||||
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
|
||||
#define ts_resource(id) ts_resource_ex(id, NULL)
|
||||
|
||||
/* frees all resources allocated for the current thread */
|
||||
TSRM_API void ts_free_thread(void);
|
||||
@@ -107,4 +108,4 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TSRM_H */
|
||||
#endif /* TSRM_H */
|
||||
+11
-1
@@ -87,6 +87,16 @@ dnl PTHREADS_CHECK()
|
||||
dnl
|
||||
dnl Try to find a way to enable POSIX threads
|
||||
dnl
|
||||
dnl Magic flags
|
||||
dnl -kthread gcc (FreeBSD)
|
||||
dnl -Kthread UDK cc (UnixWare)
|
||||
dnl -mt WorkShop cc (Solaris)
|
||||
dnl -mthreads gcc (AIX)
|
||||
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
|
||||
dnl -pthreads gcc (Solaris)
|
||||
dnl -qthreaded AIX cc V5
|
||||
dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK,[
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
@@ -99,7 +109,7 @@ CFLAGS="$save_CFLAGS"
|
||||
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
|
||||
ac_cv_pthreads_cflags=""
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for flag in -pthreads -pthread -mthreads -Kthread; do
|
||||
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
|
||||
ac_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
|
||||
+2
-2
@@ -41,9 +41,9 @@
|
||||
// #include <FlexLexer.h>
|
||||
// ...
|
||||
|
||||
#ifndef __FLEX_LEXER_H
|
||||
#ifndef FLEXLEXER_H
|
||||
// Never included before - need to define base class.
|
||||
#define __FLEX_LEXER_H
|
||||
#define FLEXLEXER_H
|
||||
#include <iostream.h>
|
||||
|
||||
extern "C++" {
|
||||
|
||||
+6
-4
@@ -3,12 +3,14 @@
|
||||
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la
|
||||
noinst_LTLIBRARIES=$(ZEND_SCANNER) libZend.la
|
||||
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
|
||||
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
|
||||
|
||||
libZend_cc_la_SOURCES=zend-scanner-cc.cc
|
||||
libZend_c_la_SOURCES=zend-scanner.c
|
||||
|
||||
libZend_gcc_la_SOURCES=zend_gcc_inline.c
|
||||
|
||||
libZend_la_SOURCES=\
|
||||
zend-parser.y \
|
||||
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
|
||||
@@ -17,13 +19,13 @@ libZend_la_SOURCES=\
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
|
||||
|
||||
libZend_la_LIBADD = $(ZEND_SCANNER)
|
||||
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
|
||||
libZend_la_LDFLAGS = @EXTRA_LIBS@
|
||||
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
|
||||
|
||||
# automake isn't too clever about "non-standard" use of lex and yacc
|
||||
|
||||
zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
|
||||
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
|
||||
|
||||
zend-scanner.c: $(srcdir)/zend-scanner.l
|
||||
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
|
||||
|
||||
@@ -151,6 +151,10 @@ SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_gcc_inline.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
+26
-8
@@ -64,6 +64,10 @@ AC_FUNC_MEMCMP
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(finite isfinite isinf isnan)
|
||||
|
||||
ZEND_FP_EXCEPT
|
||||
|
||||
AC_SUBST(ZEND_SCANNER)
|
||||
|
||||
@@ -76,10 +80,10 @@ AC_SUBST(ZEND_SCANNER)
|
||||
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --disable-debug Compile without debugging symbols],[
|
||||
[ --enable-debug Compile with debugging symbols],[
|
||||
ZEND_DEBUG=$enableval
|
||||
],[
|
||||
ZEND_DEBUG=yes
|
||||
ZEND_DEBUG=no
|
||||
])
|
||||
|
||||
])
|
||||
@@ -95,11 +99,15 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
|
||||
|
||||
AC_ARG_ENABLE(c9x-inline,
|
||||
[ --enable-c9x-inline Enable C9x-inline semantics],[
|
||||
ZEND_C9X_INLINE=$enableval
|
||||
],[
|
||||
ZEND_C9X_INLINE=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(experimental-zts,
|
||||
[ --enable-experimental-zts This will most likely break your build],[
|
||||
ZEND_EXPERIMENTAL_ZTS=$enableval
|
||||
@@ -122,6 +130,9 @@ AC_ARG_ENABLE(memory-limit,
|
||||
ZEND_MEMORY_LIMIT=no
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether to enable C9x-inline semantics)
|
||||
AC_MSG_RESULT($ZEND_C9X_INLINE)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable experimental ZTS)
|
||||
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
|
||||
|
||||
@@ -135,19 +146,19 @@ AC_MSG_CHECKING(whether to enable Zend debugging)
|
||||
AC_MSG_RESULT($ZEND_DEBUG)
|
||||
|
||||
if test "$ZEND_DEBUG" = "yes"; then
|
||||
AC_DEFINE(ZEND_DEBUG,1)
|
||||
AC_DEFINE(ZEND_DEBUG,1,[ ])
|
||||
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
|
||||
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
|
||||
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
|
||||
else
|
||||
AC_DEFINE(ZEND_DEBUG,0)
|
||||
AC_DEFINE(ZEND_DEBUG,0,[ ])
|
||||
fi
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS)
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
ZEND_SCANNER_TYPE=cc
|
||||
CPPFLAGS="$CPPFLAGS -I../TSRM"
|
||||
LIBZEND_CPLUSPLUS_CHECKS
|
||||
@@ -155,6 +166,13 @@ else
|
||||
ZEND_SCANNER_TYPE=c
|
||||
fi
|
||||
|
||||
if test "$ZEND_C9X_INLINE" = "yes"; then
|
||||
AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics])
|
||||
else
|
||||
ZEND_GCC=libZend_gcc.la
|
||||
AC_SUBST(ZEND_GCC)
|
||||
fi
|
||||
|
||||
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
|
||||
|
||||
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
|
||||
|
||||
+7
-3
@@ -40,7 +40,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
@@ -62,7 +62,7 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "ZTS" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
@@ -84,7 +84,7 @@ LIB32=link.exe -lib
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
@@ -155,6 +155,10 @@ SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_gcc_inline.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
+14
-24
@@ -3,37 +3,16 @@
|
||||
|
||||
@TOP@
|
||||
|
||||
/* This is the default configuration file to read */
|
||||
#define USE_CONFIG_FILE 1
|
||||
|
||||
/* these are defined by automake */
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
|
||||
/* define uint by configure if it is missed (QNX and BSD derived) */
|
||||
#undef uint
|
||||
|
||||
/* define ulong by configure if it is missed (most probably is) */
|
||||
#undef ulong
|
||||
|
||||
/* Undefine if you want stricter XML/SGML compliance by default */
|
||||
/* (this disables "<?expression?>" by default) */
|
||||
#define T_DEFAULT_SHORT_OPEN_TAG 1
|
||||
|
||||
/* Define both of these if you want the bundled REGEX library */
|
||||
#define REGEX 0
|
||||
#define HSREGEX 0
|
||||
|
||||
#undef ZEND_DEBUG
|
||||
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
/* Define to compile Zend thread safe */
|
||||
#undef ZTS
|
||||
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
@BOTTOM@
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
@@ -50,15 +29,26 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
/* Define if you have stdiostream.h */
|
||||
#undef HAVE_STDIOSTREAM_H
|
||||
|
||||
#if ZEND_BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#else
|
||||
# define zend_sprintf sprintf
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FINITE
|
||||
#define zend_finite(a) finite(a)
|
||||
#elif defined(HAVE_ISFINITE)
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_ISNAN) && defined(HAVE_ISINF)
|
||||
#define zend_finite(a) (isnan(a) ? 0 : isinf(a) ? 0 : 1)
|
||||
#elif defined(HAVE_ISNAN)
|
||||
#define zend_finite(a) (isnan(a) ? 0 : 1)
|
||||
#elif defined(HAVE_ISINF)
|
||||
#define zend_finite(a) (isinf(a) ? 0 : 1)
|
||||
#else
|
||||
#define zend_finite(a) (1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
|
||||
@@ -2,6 +2,24 @@ dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN(ZEND_FP_EXCEPT,[
|
||||
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <floatingpoint.h>
|
||||
],[
|
||||
fp_except x = (fp_except) 0;
|
||||
],[
|
||||
ac_cv_type_fp_except=yes
|
||||
],[
|
||||
ac_cv_type_fp_except=no
|
||||
],[
|
||||
ac_cv_type_fp_except=no
|
||||
])])
|
||||
if test "$ac_cv_type_fp_except" = "yes"; then
|
||||
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
|
||||
+105
-100
@@ -45,7 +45,7 @@
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
%expect 7
|
||||
%expect 4
|
||||
|
||||
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
|
||||
%left ','
|
||||
@@ -53,7 +53,7 @@
|
||||
%left T_LOGICAL_XOR
|
||||
%left T_LOGICAL_AND
|
||||
%right T_PRINT
|
||||
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL XT_OR_EQUAL T_SL_EQUAL T_SR_EQUAL
|
||||
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
|
||||
%left '?' ':'
|
||||
%left T_BOOLEAN_OR
|
||||
%left T_BOOLEAN_AND
|
||||
@@ -133,7 +133,6 @@
|
||||
%token T_DOLLAR_OPEN_CURLY_BRACES
|
||||
%token T_CURLY_OPEN
|
||||
%token T_PAAMAYIM_NEKUDOTAYIM
|
||||
%token T_PHP_TRACK_VARS
|
||||
|
||||
%% /* Rules */
|
||||
|
||||
@@ -181,32 +180,40 @@ unticked_statement:
|
||||
for_expr
|
||||
';' { do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
|
||||
for_expr
|
||||
';' { do_for_cond(&$6, &$7 CLS_CC); }
|
||||
';' { do_extended_info(CLS_C); do_for_cond(&$6, &$7 CLS_CC); }
|
||||
for_expr
|
||||
')' { do_free(&$9 CLS_CC); do_for_before_statement(&$4, &$7 CLS_CC); }
|
||||
for_statement { do_for_end(&$7 CLS_CC); }
|
||||
| T_SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
|
||||
| T_BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
|
||||
| T_SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
|
||||
| T_BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
|
||||
| T_BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
|
||||
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
|
||||
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
|
||||
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
|
||||
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
|
||||
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
|
||||
| T_GLOBAL global_var_list
|
||||
| T_STATIC static_var_list
|
||||
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
|
||||
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
|
||||
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
|
||||
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
|
||||
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
|
||||
| T_GLOBAL global_var_list ';'
|
||||
| T_STATIC static_var_list ';'
|
||||
| T_ECHO echo_expr_list ';'
|
||||
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
|
||||
| expr ';' { do_free(&$1 CLS_CC); }
|
||||
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
|
||||
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
|
||||
| expr ';' { do_free(&$1 CLS_CC); }
|
||||
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
|
||||
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
|
||||
| T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); }
|
||||
| T_UNSET '(' cvar ')' ';' { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$3 CLS_CC); }
|
||||
| T_UNSET '(' unset_variables ')' ';'
|
||||
| T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
|
||||
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
|
||||
| ';' /* empty statement */
|
||||
;
|
||||
|
||||
unset_variables:
|
||||
unset_variable
|
||||
| unset_variables ',' unset_variable
|
||||
;
|
||||
|
||||
unset_variable:
|
||||
cvar { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$1 CLS_CC); }
|
||||
;
|
||||
|
||||
use_filename:
|
||||
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
@@ -230,8 +237,8 @@ unticked_declaration_statement:
|
||||
|
||||
|
||||
foreach_optional_arg:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
@@ -254,23 +261,23 @@ declare_statement:
|
||||
|
||||
|
||||
declare_list:
|
||||
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
|
||||
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
|
||||
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
|
||||
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
switch_case_list:
|
||||
'{' case_list '}' { $$ = $2; }
|
||||
| '{' ';' case_list '}' { $$ = $3; }
|
||||
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
|
||||
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
|
||||
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
|
||||
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
case_list:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
|
||||
| case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
|
||||
| case_list T_CASE expr case_separator { do_extended_info(CLS_C); do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
|
||||
| case_list T_DEFAULT case_separator { do_extended_info(CLS_C); do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
|
||||
;
|
||||
|
||||
|
||||
@@ -311,8 +318,6 @@ new_else_single:
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
parameter_list:
|
||||
non_empty_parameter_list
|
||||
| /* empty */
|
||||
@@ -320,35 +325,35 @@ parameter_list:
|
||||
|
||||
|
||||
non_empty_parameter_list:
|
||||
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
function_call_parameter_list:
|
||||
non_empty_function_call_parameter_list { $$ = $1; }
|
||||
| /* empty */ { $$.u.constant.value.lval = 0; }
|
||||
non_empty_function_call_parameter_list { $$ = $1; }
|
||||
| /* empty */ { $$.u.constant.value.lval = 0; }
|
||||
;
|
||||
|
||||
|
||||
non_empty_function_call_parameter_list:
|
||||
expr_without_variable { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| cvar { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| '&' w_cvar { $$.u.constant.value.lval = 1; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
expr_without_variable { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| cvar { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| '&' w_cvar { $$.u.constant.value.lval = 1; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
;
|
||||
|
||||
global_var_list:
|
||||
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
@@ -384,14 +389,14 @@ class_statement:
|
||||
;
|
||||
|
||||
is_reference:
|
||||
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
|
||||
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
|
||||
| '&' { $$.op_type = ZEND_RETURN_REF; }
|
||||
|
||||
class_variable_decleration:
|
||||
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
|
||||
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
|
||||
| T_VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
|
||||
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
|
||||
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
|
||||
| T_VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
@@ -403,12 +408,12 @@ echo_expr_list:
|
||||
|
||||
for_expr:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
|
||||
| non_empty_for_expr { $$ = $1; }
|
||||
| non_empty_for_expr { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_for_expr:
|
||||
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| expr { $$ = $1; }
|
||||
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
@@ -426,7 +431,7 @@ expr_without_variable:
|
||||
| cvar T_MOD_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_AND_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar XT_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_XOR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_INC { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
|
||||
@@ -447,27 +452,27 @@ expr_without_variable:
|
||||
| expr '*' expr { do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '/' expr { do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '%' expr { do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr T_SL expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_SR expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_SL expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_SR expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
|
||||
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
|
||||
| '!' expr { do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
|
||||
| '~' expr { do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
|
||||
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '<' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '>' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| expr '?' { do_begin_qm_op(&$1, &$2 CLS_CC); }
|
||||
expr ':' { do_qm_true(&$4, &$2, &$5 CLS_CC); }
|
||||
expr { do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
|
||||
| function_call { $$ = $1; }
|
||||
| internal_functions_in_yacc { $$ = $1; }
|
||||
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
|
||||
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
|
||||
| T_DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
|
||||
| T_STRING_CAST expr { do_cast(&$$, &$2, IS_STRING CLS_CC); }
|
||||
| T_ARRAY_CAST expr { do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
|
||||
@@ -484,10 +489,10 @@ expr_without_variable:
|
||||
|
||||
|
||||
function_call:
|
||||
T_STRING '(' { do_extended_fcall_begin(CLS_C); $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
|
||||
T_STRING '(' { $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); do_extended_fcall_end(CLS_C); }
|
||||
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
|
||||
| cvar '(' { do_begin_dynamic_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
|
||||
@@ -497,46 +502,46 @@ function_call:
|
||||
|
||||
|
||||
exit_expr:
|
||||
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
ctor_arguments:
|
||||
/* empty */ { $$.u.constant.value.lval=0; }
|
||||
| '(' function_call_parameter_list ')' { $$ = $2; }
|
||||
/* empty */ { $$.u.constant.value.lval=0; }
|
||||
| '(' function_call_parameter_list ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
class_name:
|
||||
T_STRING { $$ = $1; }
|
||||
| r_cvar { $$ = $1; }
|
||||
| r_cvar { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
|
||||
common_scalar:
|
||||
T_LNUMBER { $$=$1; }
|
||||
| T_DNUMBER { $$=$1; }
|
||||
T_LNUMBER { $$ = $1; }
|
||||
| T_DNUMBER { $$ = $1; }
|
||||
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| T_LINE { $$ = $1; }
|
||||
| T_FILE { $$ = $1; }
|
||||
| T_LINE { $$ = $1; }
|
||||
| T_FILE { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
static_scalar: /* compile-time evaluated scalars */
|
||||
common_scalar { $$ = $1; }
|
||||
| T_STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
|
||||
| T_STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
|
||||
| '+' static_scalar { $$ = $1; }
|
||||
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
|
||||
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
|
||||
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
|
||||
;
|
||||
|
||||
|
||||
scalar:
|
||||
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
|
||||
| T_STRING_VARNAME { $$ = $1; }
|
||||
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
|
||||
| T_STRING_VARNAME { $$ = $1; }
|
||||
| common_scalar { $$ = $1; }
|
||||
| '"' encaps_list '"' { $$ = $2; }
|
||||
| '\'' encaps_list '\'' { $$ = $2; }
|
||||
@@ -545,7 +550,7 @@ scalar:
|
||||
|
||||
|
||||
static_array_pair_list:
|
||||
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
|
||||
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
|
||||
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
|
||||
;
|
||||
|
||||
@@ -556,9 +561,9 @@ possible_comma:
|
||||
|
||||
non_empty_static_array_pair_list:
|
||||
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
|
||||
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
|
||||
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
|
||||
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
|
||||
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
|
||||
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
|
||||
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
|
||||
;
|
||||
|
||||
expr:
|
||||
@@ -603,8 +608,8 @@ cvar_without_objects:
|
||||
|
||||
reference_variable:
|
||||
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
|
||||
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
|
||||
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
|
||||
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
@@ -659,33 +664,33 @@ assignment_list_element:
|
||||
|
||||
|
||||
array_pair_list:
|
||||
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
|
||||
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list possible_comma { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_array_pair_list:
|
||||
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
|
||||
| expr { do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
|
||||
| expr { do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' '&' w_cvar { do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW '&' w_cvar { do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
|
||||
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
|
||||
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
encaps_list:
|
||||
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '[' { $2.u.constant.value.chval = '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list ']' { $2.u.constant.value.chval = ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '{' { $2.u.constant.value.chval = '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '}' { $2.u.constant.value.chval = '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.chval = '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.chval = '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
|
||||
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
|
||||
| /* empty */ { do_init_string(&$$ CLS_CC); }
|
||||
|
||||
;
|
||||
@@ -703,16 +708,16 @@ encaps_var:
|
||||
|
||||
|
||||
encaps_var_offset:
|
||||
T_STRING { $$ = $1; }
|
||||
T_STRING { $$ = $1; }
|
||||
| T_NUM_STRING { $$ = $1; }
|
||||
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
internal_functions_in_yacc:
|
||||
T_ISSET '(' cvar ')' { do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
|
||||
| T_EMPTY '(' cvar ')' { do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
|
||||
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
|
||||
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
|
||||
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
|
||||
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
+7
-9
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LANGUAGE_SCANNER_H
|
||||
#define _LANGUAGE_SCANNER_H
|
||||
#ifndef ZEND_SCANNER_H
|
||||
#define ZEND_SCANNER_H
|
||||
|
||||
#ifdef ZTS
|
||||
class ZendFlexLexer : public yyFlexLexer
|
||||
@@ -33,21 +33,19 @@ public:
|
||||
#endif /* ZTS */
|
||||
|
||||
|
||||
#ifndef ZTS
|
||||
typedef struct _zend_lex_state {
|
||||
#ifndef ZTS
|
||||
YY_BUFFER_STATE buffer_state;
|
||||
int state;
|
||||
uint return_offset;
|
||||
uint lineno;
|
||||
FILE *in;
|
||||
char *filename;
|
||||
} zend_lex_state;
|
||||
#else
|
||||
typedef struct _zend_lex_state {
|
||||
ZendFlexLexer *ZFL;
|
||||
istream *input_file;
|
||||
} zend_lex_state;
|
||||
#endif
|
||||
uint lineno;
|
||||
char *filename;
|
||||
} zend_lex_state;
|
||||
|
||||
|
||||
void zend_fatal_scanner_error(char *);
|
||||
inline void restore_lexical_state(zend_lex_state * CLS_DC);
|
||||
|
||||
+45
-70
@@ -34,7 +34,6 @@
|
||||
%{
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
#include <winsock.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
@@ -92,6 +91,7 @@ private:
|
||||
stdiobuf _file;
|
||||
public:
|
||||
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
|
||||
stdiobuf* rdbuf()/* const */ { return &_file; }
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -148,12 +148,12 @@ static inline void save_lexical_state(zend_lex_state *lex_state CLS_DC)
|
||||
#ifndef ZTS
|
||||
memcpy(&lex_state->buffer_state,&YY_CURRENT_BUFFER,sizeof(YY_BUFFER_STATE));
|
||||
lex_state->in = yyin;
|
||||
lex_state->lineno = CG(zend_lineno);
|
||||
lex_state->state = YYSTATE;
|
||||
lex_state->filename = zend_get_compiled_filename(CLS_C);
|
||||
#else
|
||||
lex_state->ZFL = CG(ZFL);
|
||||
#endif
|
||||
lex_state->filename = zend_get_compiled_filename(CLS_C);
|
||||
lex_state->lineno = CG(zend_lineno);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,13 +170,13 @@ inline void restore_lexical_state(zend_lex_state *lex_state CLS_DC)
|
||||
|
||||
yy_delete_buffer(original_buffer_state);
|
||||
yyin = lex_state->in;
|
||||
CG(zend_lineno) = lex_state->lineno;
|
||||
BEGIN(lex_state->state);
|
||||
zend_restore_compiled_filename(lex_state->filename);
|
||||
#else
|
||||
delete((ZendFlexLexer *) CG(ZFL));
|
||||
CG(ZFL) = lex_state->ZFL;
|
||||
#endif
|
||||
CG(zend_lineno) = lex_state->lineno;
|
||||
zend_restore_compiled_filename(lex_state->filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -243,16 +243,21 @@ ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
|
||||
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
{
|
||||
char *file_path;
|
||||
|
||||
#ifndef ZTS
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
|
||||
file_path = file_handle->opened_path;
|
||||
break;
|
||||
case ZEND_HANDLE_FD:
|
||||
file_path = file_handle->filename;
|
||||
file_handle->opened_path = NULL;
|
||||
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
|
||||
break;
|
||||
case ZEND_HANDLE_FP:
|
||||
file_path = file_handle->filename;
|
||||
file_handle->opened_path = NULL;
|
||||
file_handle->handle.fp = file_handle->handle.fp;
|
||||
break;
|
||||
@@ -298,6 +303,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
file_path = file_handle->filename;
|
||||
|
||||
if (file_handle->handle.is->fail()) {
|
||||
delete file_handle->handle.is;
|
||||
return FAILURE;
|
||||
@@ -309,7 +317,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
CG(ZFL) = new ZendFlexLexer;
|
||||
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
|
||||
#endif
|
||||
zend_set_compiled_filename(file_handle->filename);
|
||||
zend_set_compiled_filename(file_path);
|
||||
CG(zend_lineno) = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -460,6 +468,8 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
|
||||
|
||||
CG(ZFL)->switch_streams(input_stream, &cout);
|
||||
#endif
|
||||
zend_set_compiled_filename("Eval code");
|
||||
CG(zend_lineno) = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -686,47 +696,6 @@ int yyFlexLexer::yylex()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* redefine YY_INPUT to handle urls for win32*/
|
||||
#if 0 /*defined(ZEND_WIN32)*/
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
if ( yyin->_tmpfname != "url" ){ \
|
||||
if ( yy_current_buffer->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*', n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
if ( c == '\n' ) \
|
||||
buf[n++] = (char) c; \
|
||||
if ( c == EOF && ferror( yyin ) ) \
|
||||
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
||||
result = n; \
|
||||
} \
|
||||
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
|
||||
&& ferror( yyin ) ) \
|
||||
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
||||
}else{ /* this is a url */ \
|
||||
int recv_char=0,socketd=0; \
|
||||
/*memset(buf,0,max_size);*/ \
|
||||
socketd=yyin->_file; \
|
||||
if ( yy_current_buffer->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*', n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
( (recv_char=recv( socketd,(char *)&c,1,0 ))) >0 && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
if ( c == '\n' ) \
|
||||
buf[n++] = (char) c; \
|
||||
if ( recv_char == SOCKET_ERROR ) \
|
||||
YY_FATAL_ERROR( "input from url in flex scanner failed" ); \
|
||||
result = n; \
|
||||
} \
|
||||
else if ((result = recv( socketd, (char *)buf, max_size, 0)) == SOCKET_ERROR) \
|
||||
YY_FATAL_ERROR( "input from url read in flex scanner failed" ); \
|
||||
}
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
LNUM [0-9]+
|
||||
@@ -739,6 +708,7 @@ TABS_AND_SPACES [ \t]*
|
||||
TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@]
|
||||
ENCAPSED_TOKENS [\[\]{}$]
|
||||
ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
ANY_CHAR (.|[\n])
|
||||
|
||||
%option noyylineno
|
||||
%option noyywrap
|
||||
@@ -877,7 +847,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_STRING;
|
||||
}
|
||||
|
||||
<ST_LOOKING_FOR_PROPERTY>. {
|
||||
<ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
@@ -1053,7 +1023,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"^=" {
|
||||
return XT_OR_EQUAL;
|
||||
return T_XOR_EQUAL;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"||" {
|
||||
@@ -1120,7 +1090,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
|
||||
<ST_LOOKING_FOR_VARNAME>. {
|
||||
<ST_LOOKING_FOR_VARNAME>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
@@ -1221,6 +1191,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_OPEN_TAG;
|
||||
} else {
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
@@ -1241,9 +1212,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
|
||||
zend_message_dispatcher(ZMSG_ENABLE_TRACK_VARS, NULL);
|
||||
zend_error(E_WARNING, "<?php_track_vars?> is no longer supported - please use the track_vars INI directive instead");
|
||||
HANDLE_NEWLINE(yytext[yyleng-1]);
|
||||
return T_PHP_TRACK_VARS;
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
return T_INLINE_HTML;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL} {
|
||||
@@ -1316,14 +1290,15 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
if (CG(asp_tags)) {
|
||||
BEGIN(INITIAL);
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
|
||||
} else {
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
return T_INLINE_HTML;
|
||||
}
|
||||
}
|
||||
@@ -1556,7 +1531,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"$"[^a-zA-Z_\x7f-\xff{] {
|
||||
zendlval->value.chval = yytext[0];
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
if (yyleng == 2) {
|
||||
yyless(1);
|
||||
/*unput(yytext[1]);
|
||||
@@ -1568,12 +1543,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{ENCAPSED_TOKENS} {
|
||||
zendlval->value.chval = yytext[0];
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
return yytext[0];
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
|
||||
zendlval->value.chval = yytext[0];
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
yy_push_state(ST_IN_SCRIPTING);
|
||||
/*unput('$');*/
|
||||
yyless(1);
|
||||
@@ -1582,54 +1557,54 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
<ST_SINGLE_QUOTE>"\\'" {
|
||||
zendlval->value.chval='\'';
|
||||
zendlval->value.lval = (long) '\'';
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_SINGLE_QUOTE>"\\\\" {
|
||||
zendlval->value.chval='\\';
|
||||
zendlval->value.lval = (long)'\\';
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES>"\\\"" {
|
||||
zendlval->value.chval='"';
|
||||
zendlval->value.lval = (long) '"';
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_BACKQUOTE>"\\`" {
|
||||
zendlval->value.chval='`';
|
||||
zendlval->value.lval = (long) '`';
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"[0-7]{1,3} {
|
||||
zendlval->value.chval = (char) strtol (yytext+1, NULL, 8);
|
||||
zendlval->value.lval = strtol(yytext+1, NULL, 8);
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\x"[0-9A-Fa-f]{1,2} {
|
||||
zendlval->value.chval = (char) strtol (yytext+2, NULL, 16);
|
||||
zendlval->value.lval = strtol (yytext+2, NULL, 16);
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\". {
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"{ANY_CHAR} {
|
||||
switch (yytext[1]) {
|
||||
case 'n':
|
||||
zendlval->value.chval='\n';
|
||||
zendlval->value.lval = (long) '\n';
|
||||
break;
|
||||
case 't':
|
||||
zendlval->value.chval='\t';
|
||||
zendlval->value.lval = (long) '\t';
|
||||
break;
|
||||
case 'r':
|
||||
zendlval->value.chval='\r';
|
||||
zendlval->value.lval = (long) '\r';
|
||||
break;
|
||||
case '\\':
|
||||
zendlval->value.chval='\\';
|
||||
zendlval->value.lval = (long) '\\';
|
||||
break;
|
||||
case '$':
|
||||
zendlval->value.chval=yytext[1];
|
||||
zendlval->value.lval = (long) yytext[1];
|
||||
break;
|
||||
case '{':
|
||||
zendlval->value.chval=yytext[1];
|
||||
zendlval->value.lval = (long) yytext[1];
|
||||
break;
|
||||
default:
|
||||
zendlval->value.str.val = estrndup(yytext,yyleng);
|
||||
@@ -1679,6 +1654,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>. {
|
||||
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>{ANY_CHAR} {
|
||||
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE);
|
||||
}
|
||||
+138
-38
@@ -36,6 +36,10 @@
|
||||
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
|
||||
#endif
|
||||
|
||||
#if defined(ZEND_WIN32) && ZEND_DEBUG
|
||||
BOOL WINAPI IsDebuggerPresent(VOID);
|
||||
#endif
|
||||
|
||||
/* true multithread-shared globals */
|
||||
ZEND_API zend_class_entry zend_standard_class_def;
|
||||
ZEND_API int (*zend_printf)(const char *format, ...);
|
||||
@@ -44,14 +48,11 @@ ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
|
||||
ZEND_API void (*zend_block_interruptions)(void);
|
||||
ZEND_API void (*zend_unblock_interruptions)(void);
|
||||
ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
|
||||
static void (*zend_message_dispatcher_p)(long message, void *data);
|
||||
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
|
||||
|
||||
#if ZEND_NEW_ERROR_HANDLING
|
||||
static void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
#else
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *format, ...);
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_API int compiler_globals_id;
|
||||
@@ -69,7 +70,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies Ltd.\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
|
||||
|
||||
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
@@ -222,7 +223,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
|
||||
if (opened_path) {
|
||||
*opened_path = strdup(filename);
|
||||
}
|
||||
return fopen(filename, "r");
|
||||
return fopen(filename, "rb");
|
||||
}
|
||||
|
||||
|
||||
@@ -232,8 +233,8 @@ static void register_standard_class(void)
|
||||
zend_standard_class_def.name_length = sizeof("stdClass") - 1;
|
||||
zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length);
|
||||
zend_standard_class_def.parent = NULL;
|
||||
zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
|
||||
zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
|
||||
zend_standard_class_def.handle_function_call = NULL;
|
||||
zend_standard_class_def.handle_property_get = NULL;
|
||||
zend_standard_class_def.handle_property_set = NULL;
|
||||
@@ -243,21 +244,33 @@ static void register_standard_class(void)
|
||||
}
|
||||
|
||||
|
||||
static void zend_set_default_compile_time_values(CLS_D)
|
||||
{
|
||||
/* default compile-time values */
|
||||
CG(asp_tags) = 0;
|
||||
CG(short_tags) = 1;
|
||||
CG(allow_call_time_pass_reference) = 1;
|
||||
CG(extended_info) = 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
|
||||
{
|
||||
zend_function tmp_func;
|
||||
zend_class_entry tmp_class;
|
||||
|
||||
compiler_globals->compiled_filename = NULL;
|
||||
|
||||
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
|
||||
zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function));
|
||||
|
||||
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1);
|
||||
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
|
||||
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
|
||||
|
||||
compiler_globals->extended_info = 0;
|
||||
zend_set_default_compile_time_values(CLS_C);
|
||||
}
|
||||
|
||||
|
||||
@@ -281,6 +294,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
|
||||
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
|
||||
}
|
||||
zend_init_rsrc_plist(ELS_C);
|
||||
EG(lambda_count)=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -298,6 +312,10 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* FreeBSD floating point precision fix */
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
|
||||
{
|
||||
@@ -310,6 +328,21 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
start_memory_manager(ALS_C);
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
{
|
||||
/* FreeBSD floating point precision fix */
|
||||
#ifdef HAVE_FP_EXCEPT
|
||||
fp_except
|
||||
#else
|
||||
fp_except_t
|
||||
#endif
|
||||
mask;
|
||||
|
||||
mask = fpgetmask();
|
||||
fpsetmask(mask & ~FP_X_IMP);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set up utility functions and values */
|
||||
zend_error_cb = utility_functions->error_function;
|
||||
zend_printf = utility_functions->printf_function;
|
||||
@@ -335,10 +368,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
|
||||
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
|
||||
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_hash_init(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1);
|
||||
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
|
||||
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
|
||||
register_standard_class();
|
||||
zend_hash_init(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1);
|
||||
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
|
||||
zend_init_rsrc_list_dtors();
|
||||
|
||||
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
|
||||
@@ -359,6 +392,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
|
||||
#else
|
||||
zend_startup_constants();
|
||||
zend_set_default_compile_time_values(CLS_C);
|
||||
#endif
|
||||
zend_register_standard_constants(ELS_C);
|
||||
|
||||
@@ -376,6 +410,9 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
|
||||
void zend_shutdown()
|
||||
{
|
||||
#ifdef ZEND_WIN32
|
||||
zend_shutdown_timeout_thread();
|
||||
#endif
|
||||
#ifndef ZTS
|
||||
zend_destroy_rsrc_plist();
|
||||
#endif
|
||||
@@ -460,12 +497,20 @@ void zend_activate_modules()
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
|
||||
}
|
||||
|
||||
|
||||
void zend_deactivate(CLS_D ELS_DC)
|
||||
void zend_deactivate_modules()
|
||||
{
|
||||
ELS_FETCH();
|
||||
EG(opline_ptr) = NULL; /* we're no longer executing anything */
|
||||
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
|
||||
}
|
||||
|
||||
void zend_deactivate(CLS_D ELS_DC)
|
||||
{
|
||||
/* we're no longer executing anything */
|
||||
EG(opline_ptr) = NULL;
|
||||
EG(active_symbol_table) = NULL;
|
||||
|
||||
shutdown_scanner(CLS_C);
|
||||
shutdown_executor(ELS_C);
|
||||
shutdown_compiler(CLS_C);
|
||||
@@ -492,19 +537,17 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if ZEND_NEW_ERROR_HANDLING
|
||||
|
||||
#define ZEND_ERROR_BUFFER_SIZE 1024
|
||||
|
||||
ZEND_API void zend_error(int type, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
zval **params;
|
||||
zval retval;
|
||||
zval error_type, error_message;
|
||||
zval ***params;
|
||||
zval *retval;
|
||||
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
|
||||
char *error_filename;
|
||||
uint error_lineno;
|
||||
zval *orig_user_error_handler;
|
||||
ELS_FETCH();
|
||||
CLS_FETCH();
|
||||
|
||||
@@ -546,6 +589,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
|
||||
|
||||
va_start(args, format);
|
||||
|
||||
/* if we don't have a user defined error handler */
|
||||
if (!EG(user_error_handler)) {
|
||||
zend_error_cb(type, error_filename, error_lineno, format, args);
|
||||
@@ -561,34 +605,90 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
break;
|
||||
default:
|
||||
/* Handle the error in user space */
|
||||
INIT_PZVAL(&error_message);
|
||||
INIT_PZVAL(&error_type);
|
||||
error_message.value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
|
||||
ALLOC_INIT_ZVAL(z_error_message);
|
||||
ALLOC_INIT_ZVAL(z_error_type);
|
||||
ALLOC_INIT_ZVAL(z_error_filename);
|
||||
ALLOC_INIT_ZVAL(z_error_lineno);
|
||||
ALLOC_INIT_ZVAL(z_context);
|
||||
z_error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
|
||||
|
||||
/* error_message.value.str.len = vsnprintf(error_message->value.str.val, error_message->value.str.len-1, format, args); */
|
||||
error_message.value.str.len = vsprintf(error_message.value.str.val, format, args);
|
||||
error_message.type = IS_STRING;
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
|
||||
#else
|
||||
/* This is risky... */
|
||||
z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args);
|
||||
#endif
|
||||
z_error_message->type = IS_STRING;
|
||||
|
||||
error_type.value.lval = type;
|
||||
error_type.type = IS_LONG;
|
||||
z_error_type->value.lval = type;
|
||||
z_error_type->type = IS_LONG;
|
||||
|
||||
params = (zval **) emalloc(sizeof(zval *)*2);
|
||||
params[0] = &error_type;
|
||||
params[1] = &error_message;
|
||||
if (error_filename) {
|
||||
z_error_filename->value.str.len = strlen(error_filename);
|
||||
z_error_filename->value.str.val = estrndup(error_filename, z_error_filename->value.str.len);
|
||||
z_error_filename->type = IS_STRING;
|
||||
}
|
||||
|
||||
z_error_lineno->value.lval = error_lineno;
|
||||
z_error_lineno->type = IS_LONG;
|
||||
|
||||
if (call_user_function(CG(function_table), NULL, EG(user_error_handler), &retval, 2, params)==SUCCESS) {
|
||||
zval_dtor(&retval);
|
||||
z_context->value.ht = EG(active_symbol_table);
|
||||
z_context->type = IS_ARRAY;
|
||||
ZVAL_ADDREF(z_context); /* we don't want this one to be freed */
|
||||
|
||||
params = (zval ***) emalloc(sizeof(zval **)*5);
|
||||
params[0] = &z_error_type;
|
||||
params[1] = &z_error_message;
|
||||
params[2] = &z_error_filename;
|
||||
params[3] = &z_error_lineno;
|
||||
params[4] = &z_context;
|
||||
|
||||
orig_user_error_handler = EG(user_error_handler);
|
||||
EG(user_error_handler) = NULL;
|
||||
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL)==SUCCESS) {
|
||||
zval_ptr_dtor(&retval);
|
||||
} else {
|
||||
/* The user error handler failed, use built-in error handler */
|
||||
zend_error_cb(type, error_filename, error_lineno, format, args);
|
||||
}
|
||||
EG(user_error_handler) = orig_user_error_handler;
|
||||
|
||||
efree(params);
|
||||
efree(error_message.value.str.val);
|
||||
zval_ptr_dtor(&z_error_message);
|
||||
zval_ptr_dtor(&z_error_type);
|
||||
zval_ptr_dtor(&z_error_filename);
|
||||
zval_ptr_dtor(&z_error_lineno);
|
||||
if (ZVAL_REFCOUNT(z_context)==2) {
|
||||
FREE_ZVAL(z_context);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
|
||||
{
|
||||
#if ZEND_DEBUG
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
# ifdef ZEND_WIN32
|
||||
{
|
||||
char output_buf[1024];
|
||||
|
||||
vsnprintf(output_buf, 1024, format, args);
|
||||
OutputDebugString(output_buf);
|
||||
OutputDebugString("\n");
|
||||
if (trigger_break && IsDebuggerPresent()) {
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
# else
|
||||
vfprintf(stderr, format, args);
|
||||
fprintf(stderr, "\n");
|
||||
# endif
|
||||
va_end(args);
|
||||
#endif
|
||||
}
|
||||
+39
-28
@@ -18,12 +18,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_H
|
||||
#define _ZEND_H
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "0.99"
|
||||
|
||||
#define ZEND_NEW_ERROR_HANDLING 0
|
||||
#define ZEND_VERSION "1.0.1"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BEGIN_EXTERN_C() extern "C" {
|
||||
@@ -125,6 +123,11 @@
|
||||
#define ZEND_FILE_LINE_ORIG_RELAY_CC
|
||||
#endif /* ZEND_DEBUG */
|
||||
|
||||
#ifdef ZTS
|
||||
#define ZTS_V 1
|
||||
#else
|
||||
#define ZTS_V 0
|
||||
#endif
|
||||
|
||||
#include "zend_errors.h"
|
||||
#include "zend_alloc.h"
|
||||
@@ -132,6 +135,7 @@
|
||||
typedef unsigned char zend_bool;
|
||||
typedef unsigned char zend_uchar;
|
||||
typedef unsigned int zend_uint;
|
||||
typedef unsigned long zend_ulong;
|
||||
typedef unsigned short zend_ushort;
|
||||
|
||||
#undef SUCCESS
|
||||
@@ -159,7 +163,6 @@ typedef union _zvalue_value {
|
||||
char *val;
|
||||
int len;
|
||||
} str;
|
||||
char chval; /* char value */
|
||||
HashTable *ht; /* hash table value */
|
||||
struct {
|
||||
zend_class_entry *ce;
|
||||
@@ -222,11 +225,7 @@ struct _zend_class_entry {
|
||||
|
||||
|
||||
typedef struct _zend_utility_functions {
|
||||
#if ZEND_NEW_ERROR_HANDLING
|
||||
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
#else
|
||||
void (*error_function)(int type, const char *format, ...);
|
||||
#endif
|
||||
int (*printf_function)(const char *format, ...);
|
||||
int (*write_function)(const char *str, uint str_length);
|
||||
FILE *(*fopen_function)(const char *filename, char **opened_path);
|
||||
@@ -239,9 +238,6 @@ typedef struct _zend_utility_functions {
|
||||
|
||||
|
||||
typedef struct _zend_utility_values {
|
||||
zend_bool short_tags;
|
||||
zend_bool asp_tags;
|
||||
zend_bool allow_call_time_pass_reference;
|
||||
char *import_use_extension;
|
||||
uint import_use_extension_length;
|
||||
} zend_utility_values;
|
||||
@@ -256,6 +252,8 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#define ZEND_STRL(str) (str), (sizeof(str)-1)
|
||||
#define ZEND_STRS(str) (str), (sizeof(str)
|
||||
#define ZEND_NORMALIZE_BOOL(n) \
|
||||
((n) ? (((n)>0) ? 1 : -1) : 0)
|
||||
|
||||
|
||||
/* data types */
|
||||
@@ -268,9 +266,10 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
|
||||
#define IS_BOOL 6
|
||||
#define IS_RESOURCE 7
|
||||
#define IS_CONSTANT 8
|
||||
#define IS_CONSTANT_ARRAY 9
|
||||
|
||||
/* Special data type to temporarily mark large numbers */
|
||||
#define FLAG_IS_BC 9 /* for parser internal use only */
|
||||
#define FLAG_IS_BC 10 /* for parser internal use only */
|
||||
|
||||
/* overloaded elements data types */
|
||||
#define OE_IS_ARRAY (1<<0)
|
||||
@@ -299,6 +298,13 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
|
||||
ZEND_API void zend_print_zval_r(zval *expr, int indent);
|
||||
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
|
||||
|
||||
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
|
||||
#if ZEND_DEBUG
|
||||
#define Z_DBG(expr) (expr)
|
||||
#else
|
||||
#define Z_DBG(expr)
|
||||
#endif
|
||||
|
||||
ZEND_API extern char *empty_string;
|
||||
|
||||
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
|
||||
@@ -325,14 +331,10 @@ extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
|
||||
extern ZEND_API void (*zend_block_interruptions)(void);
|
||||
extern ZEND_API void (*zend_unblock_interruptions)(void);
|
||||
extern ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
|
||||
|
||||
#if ZEND_NEW_ERROR_HANDLING
|
||||
ZEND_API void zend_error(int type, const char *format, ...);
|
||||
#else
|
||||
#define zend_error zend_error_cb
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *format, ...);
|
||||
#endif
|
||||
|
||||
void zenderror(char *error);
|
||||
|
||||
@@ -356,13 +358,17 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
/* Messages for applications of Zend */
|
||||
#define ZMSG_ENABLE_TRACK_VARS 1L
|
||||
#define ZMSG_FAILED_INCLUDE_FOPEN 2L
|
||||
#define ZMSG_FAILED_REQUIRE_FOPEN 3L
|
||||
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 4L
|
||||
#define ZMSG_MEMORY_LEAK_DETECTED 5L
|
||||
#define ZMSG_MEMORY_LEAK_REPEATED 6L
|
||||
#define ZMSG_LOG_SCRIPT_NAME 7L
|
||||
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
|
||||
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
|
||||
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
|
||||
#define ZMSG_MEMORY_LEAK_DETECTED 4L
|
||||
#define ZMSG_MEMORY_LEAK_REPEATED 5L
|
||||
#define ZMSG_LOG_SCRIPT_NAME 6L
|
||||
|
||||
|
||||
#define ZVAL_ADDREF(pz) (++(pz)->refcount)
|
||||
#define ZVAL_DELREF(pz) (--(pz)->refcount)
|
||||
#define ZVAL_REFCOUNT(pz) ((pz)->refcount)
|
||||
|
||||
#define INIT_PZVAL(z) \
|
||||
(z)->refcount = 1; \
|
||||
@@ -399,6 +405,11 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
SEPARATE_ZVAL(ppzv); \
|
||||
}
|
||||
|
||||
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \
|
||||
if (!PZVAL_IS_REF(*ppzv)) { \
|
||||
SEPARATE_ZVAL(ppzv); \
|
||||
(*(ppzv))->is_ref = 1; \
|
||||
}
|
||||
|
||||
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
|
||||
(zv) = *(pzv); \
|
||||
@@ -406,7 +417,7 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
zval_copy_ctor(&(zv)); \
|
||||
(pzv)->refcount--; \
|
||||
} else { \
|
||||
FREE_ZVAL(pzv); \
|
||||
FREE_ZVAL(pzv); \
|
||||
} \
|
||||
INIT_PZVAL(&(zv));
|
||||
|
||||
@@ -423,7 +434,7 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
#define EMPTY_SWITCH_DEFAULT_CASE()
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_H */
|
||||
#endif /* ZEND_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+81
-24
@@ -25,7 +25,7 @@
|
||||
#include "zend_constants.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
/* these variables are true statics/globals, and have to be mutex'ed on every access */
|
||||
@@ -50,9 +50,9 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...)
|
||||
|
||||
va_start(ptr, param_count);
|
||||
|
||||
while (param_count>0) {
|
||||
while (param_count-->0) {
|
||||
param = va_arg(ptr, zval **);
|
||||
param_ptr = *(p-param_count);
|
||||
param_ptr = *(p-arg_count);
|
||||
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
|
||||
zval *new_tmp;
|
||||
|
||||
@@ -61,11 +61,11 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...)
|
||||
zval_copy_ctor(new_tmp);
|
||||
INIT_PZVAL(new_tmp);
|
||||
param_ptr = new_tmp;
|
||||
((zval *) *(p-param_count))->refcount--;
|
||||
*(p-param_count) = param_ptr;
|
||||
((zval *) *(p-arg_count))->refcount--;
|
||||
*(p-arg_count) = param_ptr;
|
||||
}
|
||||
*param = param_ptr;
|
||||
param_count--;
|
||||
arg_count--;
|
||||
}
|
||||
va_end(ptr);
|
||||
|
||||
@@ -87,9 +87,8 @@ ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
||||
while (param_count>0) {
|
||||
param_ptr = *(p-param_count);
|
||||
while (param_count-->0) {
|
||||
param_ptr = *(p-arg_count);
|
||||
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
|
||||
zval *new_tmp;
|
||||
|
||||
@@ -98,11 +97,11 @@ ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_
|
||||
zval_copy_ctor(new_tmp);
|
||||
INIT_PZVAL(new_tmp);
|
||||
param_ptr = new_tmp;
|
||||
((zval *) *(p-param_count))->refcount--;
|
||||
*(p-param_count) = param_ptr;
|
||||
((zval *) *(p-arg_count))->refcount--;
|
||||
*(p-arg_count) = param_ptr;
|
||||
}
|
||||
*(argument_array++) = param_ptr;
|
||||
param_count--;
|
||||
arg_count--;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
@@ -129,9 +128,9 @@ ZEND_API int zend_get_parameters_ex(int param_count, ...)
|
||||
}
|
||||
|
||||
va_start(ptr, param_count);
|
||||
while (param_count>0) {
|
||||
while (param_count-->0) {
|
||||
param = va_arg(ptr, zval ***);
|
||||
*param = (zval **) p-(param_count--);
|
||||
*param = (zval **) p-(arg_count--);
|
||||
}
|
||||
va_end(ptr);
|
||||
|
||||
@@ -152,8 +151,8 @@ ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_arra
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
while (param_count>0) {
|
||||
*(argument_array++) = (zval **) p-(param_count--);
|
||||
while (param_count-->0) {
|
||||
*(argument_array++) = (zval **) p-(arg_count--);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
@@ -189,7 +188,7 @@ ZEND_API inline int _array_init(zval *arg ZEND_FILE_LINE_DC)
|
||||
ALLOC_HASHTABLE_REL(arg->value.ht);
|
||||
|
||||
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) {
|
||||
zend_error(E_CORE_ERROR, "Cannot allocate memory for array");
|
||||
zend_error(E_ERROR, "Cannot allocate memory for array");
|
||||
return FAILURE;
|
||||
}
|
||||
arg->type = IS_ARRAY;
|
||||
@@ -202,7 +201,7 @@ ZEND_API inline int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND
|
||||
zval *tmp;
|
||||
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply(&class_type->default_properties, (int (*)(void *)) zval_update_constant);
|
||||
zend_hash_apply_with_argument(&class_type->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
|
||||
@@ -708,15 +707,22 @@ ZEND_API int zend_startup_module(zend_module_entry *module)
|
||||
|
||||
|
||||
/* registers all functions in *library_functions in the function hash */
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table)
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type)
|
||||
{
|
||||
zend_function_entry *ptr = functions;
|
||||
zend_function function;
|
||||
zend_internal_function *internal_function = (zend_internal_function *)&function;
|
||||
int count=0,unload=0;
|
||||
HashTable *target_function_table = function_table;
|
||||
int error_type;
|
||||
CLS_FETCH();
|
||||
|
||||
if (type==MODULE_PERSISTENT) {
|
||||
error_type = E_CORE_WARNING;
|
||||
} else {
|
||||
error_type = E_WARNING;
|
||||
}
|
||||
|
||||
if (!target_function_table) {
|
||||
target_function_table = CG(function_table);
|
||||
}
|
||||
@@ -727,7 +733,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
|
||||
internal_function->arg_types = ptr->func_arg_types;
|
||||
internal_function->function_name = ptr->fname;
|
||||
if (!internal_function->handler) {
|
||||
zend_error(E_CORE_WARNING,"Null function defined as active function");
|
||||
zend_error(error_type, "Null function defined as active function");
|
||||
zend_unregister_functions(functions, count, target_function_table);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -741,7 +747,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
|
||||
if (unload) { /* before unloading, display all remaining bad function in the module */
|
||||
while (ptr->fname) {
|
||||
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
|
||||
zend_error(E_CORE_WARNING, "Function registration failed - duplicate name - %s",ptr->fname);
|
||||
zend_error(error_type, "Function registration failed - duplicate name - %s",ptr->fname);
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
@@ -783,7 +789,7 @@ ZEND_API int zend_register_module(zend_module_entry *module)
|
||||
#if 0
|
||||
zend_printf("%s: Registering module %d\n",module->name, module->module_number);
|
||||
#endif
|
||||
if (module->functions && zend_register_functions(module->functions, NULL)==FAILURE) {
|
||||
if (module->functions && zend_register_functions(module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -867,8 +873,31 @@ int zend_next_free_module(void)
|
||||
return ++module_count;
|
||||
}
|
||||
|
||||
/* If parent_ce is not NULL then it inherits from parent_ce
|
||||
* If parent_ce is NULL and parent_name isn't then it looks for the parent and inherits from it
|
||||
* If both parent_ce and parent_name are NULL it does a regular class registration
|
||||
* If parent_name is specified but not found NULL is returned
|
||||
*/
|
||||
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name)
|
||||
{
|
||||
zend_class_entry *register_class;
|
||||
CLS_FETCH();
|
||||
|
||||
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry)
|
||||
if (!parent_ce && parent_name) {
|
||||
if (zend_hash_find(CG(class_table), parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
register_class = zend_register_internal_class(class_entry);
|
||||
|
||||
if (parent_ce) {
|
||||
do_inheritance(register_class, parent_ce);
|
||||
}
|
||||
return register_class;
|
||||
}
|
||||
|
||||
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry)
|
||||
{
|
||||
zend_class_entry *register_class;
|
||||
char *lowercase_name = zend_strndup(class_entry->name, class_entry->name_length);
|
||||
@@ -886,7 +915,7 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry
|
||||
|
||||
|
||||
if (class_entry->builtin_functions) {
|
||||
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table);
|
||||
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
|
||||
}
|
||||
|
||||
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class);
|
||||
@@ -925,3 +954,31 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
va_end(symbol_table_list);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Disabled functions support */
|
||||
|
||||
static ZEND_FUNCTION(display_disabled_function)
|
||||
{
|
||||
zend_error(E_WARNING, "%s() has been disabled for security reasons.", get_active_function_name());
|
||||
}
|
||||
|
||||
|
||||
static zend_function_entry disabled_function[] = {
|
||||
ZEND_FE(display_disabled_function, NULL)
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
ZEND_API int zend_disable_function(char *function_name, uint function_name_length)
|
||||
{
|
||||
CLS_FETCH();
|
||||
|
||||
if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
disabled_function[0].fname = function_name;
|
||||
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
|
||||
}
|
||||
+11
-6
@@ -18,14 +18,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_API_H
|
||||
#define _ZEND_API_H
|
||||
#ifndef ZEND_API_H
|
||||
#define ZEND_API_H
|
||||
|
||||
#include "modules.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_execute.h"
|
||||
|
||||
#define ZEND_FN(name) zend_if_##name
|
||||
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
|
||||
@@ -108,11 +109,15 @@ ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_arra
|
||||
|
||||
ZEND_API int ParameterPassedByReference(int ht, uint n);
|
||||
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table);
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type);
|
||||
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
|
||||
ZEND_API int zend_register_module(zend_module_entry *module_entry);
|
||||
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry);
|
||||
|
||||
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry);
|
||||
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name);
|
||||
|
||||
ZEND_API zend_module_entry *zend_get_module(int module_number);
|
||||
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
|
||||
|
||||
ZEND_API void wrong_param_count(void);
|
||||
|
||||
@@ -173,7 +178,7 @@ ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, i
|
||||
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
|
||||
|
||||
ZEND_API int add_property_long(zval *arg, char *key, long l);
|
||||
ZEND_API int add_property_unset(zval *arg, char *key);
|
||||
@@ -411,7 +416,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
|
||||
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
|
||||
|
||||
#endif /* _ZEND_API_H */
|
||||
#endif /* ZEND_API_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+88
-31
@@ -50,12 +50,12 @@ ZEND_API zend_alloc_globals alloc_globals;
|
||||
|
||||
# if MEMORY_LIMIT
|
||||
# if ZEND_DEBUG
|
||||
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s, __zend_filename, __zend_lineno)
|
||||
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
|
||||
# else
|
||||
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,NULL,0)
|
||||
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL,0)
|
||||
# endif
|
||||
|
||||
#define _CHECK_MEMORY_LIMIT(s,file,lineno) { AG(allocated_memory) += (s);\
|
||||
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
|
||||
if (AG(memory_limit)<AG(allocated_memory)) {\
|
||||
if (!file) { \
|
||||
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
|
||||
@@ -67,7 +67,7 @@ ZEND_API zend_alloc_globals alloc_globals;
|
||||
# endif
|
||||
|
||||
#ifndef CHECK_MEMORY_LIMIT
|
||||
#define CHECK_MEMORY_LIMIT(s)
|
||||
#define CHECK_MEMORY_LIMIT(s, rs)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -99,15 +99,30 @@ ZEND_API zend_alloc_globals alloc_globals;
|
||||
} \
|
||||
p->pLast = (zend_mem_header *) NULL;
|
||||
|
||||
#define DECLARE_CACHE_VARS \
|
||||
unsigned int real_size; \
|
||||
unsigned int cache_index;
|
||||
|
||||
#define REAL_SIZE(size) ((size+7) & ~0x7)
|
||||
|
||||
#define CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size) \
|
||||
real_size = REAL_SIZE(size); \
|
||||
cache_index = real_size >> 3;
|
||||
|
||||
#define SIZE real_size
|
||||
|
||||
#define CACHE_INDEX cache_index
|
||||
|
||||
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
zend_mem_header *p;
|
||||
DECLARE_CACHE_VARS
|
||||
ALS_FETCH();
|
||||
|
||||
if (!ZEND_DISABLE_MEMORY_CACHE && (size < MAX_CACHED_MEMORY) && (AG(cache_count)[size] > 0)) {
|
||||
p = AG(cache)[size][--AG(cache_count)[size]];
|
||||
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
|
||||
|
||||
if (!ZEND_DISABLE_MEMORY_CACHE && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] > 0)) {
|
||||
p = AG(cache)[CACHE_INDEX][--AG(cache_count)[CACHE_INDEX]];
|
||||
#if ZEND_DEBUG
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
@@ -115,18 +130,22 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
p->reported = 0;
|
||||
AG(cache_stats)[size][1]++;
|
||||
AG(cache_stats)[CACHE_INDEX][1]++;
|
||||
#endif
|
||||
p->persistent = 0;
|
||||
p->cached = 0;
|
||||
p->size = size;
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
|
||||
} else {
|
||||
#if ZEND_DEBUG
|
||||
if (size<MAX_CACHED_MEMORY) {
|
||||
AG(cache_stats)[size][0]++;
|
||||
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
|
||||
AG(cache_stats)[CACHE_INDEX][0]++;
|
||||
}
|
||||
#endif
|
||||
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + size + PLATFORM_PADDING + END_ALIGNMENT(size) + END_MAGIC_SIZE);
|
||||
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + SIZE + PLATFORM_PADDING + END_ALIGNMENT(SIZE) + END_MAGIC_SIZE);
|
||||
}
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
@@ -143,7 +162,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
}
|
||||
p->persistent = p->cached = 0;
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
p->size = size;
|
||||
p->size = size; /* Save real size for correct cache output */
|
||||
#if ZEND_DEBUG
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
@@ -151,10 +170,10 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
p->reported = 0;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
CHECK_MEMORY_LIMIT(size);
|
||||
CHECK_MEMORY_LIMIT(size, SIZE);
|
||||
#endif
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
|
||||
@@ -164,29 +183,34 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
|
||||
DECLARE_CACHE_VARS
|
||||
ALS_FETCH();
|
||||
|
||||
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
|
||||
#if ZEND_DEBUG
|
||||
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
|
||||
return;
|
||||
}
|
||||
memset(ptr, 0x5a, p->size);
|
||||
memset(ptr, 0x5a, SIZE);
|
||||
#endif
|
||||
|
||||
if (!ZEND_DISABLE_MEMORY_CACHE
|
||||
&& !p->persistent && (p->size < MAX_CACHED_MEMORY) && (AG(cache_count)[p->size] < MAX_CACHED_ENTRIES)) {
|
||||
AG(cache)[p->size][AG(cache_count)[p->size]++] = p;
|
||||
&& !p->persistent && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) {
|
||||
AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p;
|
||||
p->cached = 1;
|
||||
#if ZEND_DEBUG
|
||||
p->magic = MEM_BLOCK_CACHED_MAGIC;
|
||||
#endif
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
REMOVE_POINTER_FROM_LIST(p);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return;
|
||||
}
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
REMOVE_POINTER_FROM_LIST(p);
|
||||
|
||||
#if MEMORY_LIMIT
|
||||
AG(allocated_memory) -= p->size;
|
||||
AG(allocated_memory) -= SIZE;
|
||||
#endif
|
||||
|
||||
free(p);
|
||||
@@ -198,14 +222,14 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI
|
||||
{
|
||||
void *p;
|
||||
int final_size=size*nmemb;
|
||||
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (!p) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *) p;
|
||||
}
|
||||
memset(p,(int)NULL,final_size);
|
||||
memset(p,(int)NULL, final_size);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p;
|
||||
}
|
||||
@@ -215,14 +239,18 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
|
||||
{
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
|
||||
zend_mem_header *orig = p;
|
||||
DECLARE_CACHE_VARS
|
||||
ALS_FETCH();
|
||||
|
||||
if (!ptr) {
|
||||
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
|
||||
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
REMOVE_POINTER_FROM_LIST(p);
|
||||
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
|
||||
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE)+END_MAGIC_SIZE);
|
||||
if (!p) {
|
||||
if (!allow_failure) {
|
||||
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
|
||||
@@ -241,10 +269,10 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
CHECK_MEMORY_LIMIT(size - p->size);
|
||||
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
|
||||
#endif
|
||||
p->size = size;
|
||||
|
||||
@@ -319,6 +347,11 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
|
||||
|
||||
ZEND_API void start_memory_manager(ALS_D)
|
||||
{
|
||||
#ifndef ZTS
|
||||
int i, j;
|
||||
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
|
||||
#endif
|
||||
|
||||
AG(phead) = AG(head) = NULL;
|
||||
|
||||
#if MEMORY_LIMIT
|
||||
@@ -327,27 +360,43 @@ ZEND_API void start_memory_manager(ALS_D)
|
||||
AG(memory_exhausted)=0;
|
||||
#endif
|
||||
|
||||
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
|
||||
memset(AG(cache_count),0,sizeof(AG(cache_count)));
|
||||
|
||||
#ifndef ZTS
|
||||
/* Initialize cache, to prevent fragmentation */
|
||||
/* We can't do this in ZTS mode, because calling emalloc() from within start_memory_manager()
|
||||
* will yield an endless recursion calling to alloc_globals_ctor()
|
||||
*/
|
||||
for (i=1; i<MAX_CACHED_MEMORY; i++) {
|
||||
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
|
||||
cached_entries[i][j] = emalloc(8*i);
|
||||
}
|
||||
}
|
||||
for (i=1; i<MAX_CACHED_MEMORY; i++) {
|
||||
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
|
||||
efree(cached_entries[i][j]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
|
||||
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
|
||||
#endif
|
||||
|
||||
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
|
||||
memset(AG(cache_count),0,MAX_CACHED_MEMORY*sizeof(unsigned char));
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
{
|
||||
zend_mem_header *p, *t;
|
||||
int fci;
|
||||
unsigned int fci, i, j;
|
||||
#if ZEND_DEBUG
|
||||
int had_leaks=0;
|
||||
#endif
|
||||
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
|
||||
ALS_FETCH();
|
||||
|
||||
|
||||
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
|
||||
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
|
||||
while (fast_cache_list_entry) {
|
||||
@@ -395,6 +444,14 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
}
|
||||
}
|
||||
|
||||
if(clean_cache) {
|
||||
for (i=1; i<MAX_CACHED_MEMORY; i++) {
|
||||
for (j=0; j<AG(cache_count)[i]; j++) {
|
||||
free(AG(cache)[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if (ZEND_DEBUG)
|
||||
do {
|
||||
zval display_memory_cache_stats;
|
||||
@@ -519,7 +576,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
|
||||
|
||||
|
||||
if (valid_beginning
|
||||
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))) != MEM_BLOCK_END_MAGIC) {
|
||||
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))) != MEM_BLOCK_END_MAGIC) {
|
||||
long magic_num = MEM_BLOCK_END_MAGIC;
|
||||
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
|
||||
int overflows=0;
|
||||
@@ -529,7 +586,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
|
||||
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
had_problems=1;
|
||||
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+p->size+PLATFORM_PADDING;
|
||||
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING;
|
||||
|
||||
for (i=0; i<sizeof(long); i++) {
|
||||
if (overflow_ptr[i]!=magic_ptr[i]) {
|
||||
@@ -539,7 +596,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
|
||||
|
||||
zend_debug_alloc_output("%10s\t", "End:");
|
||||
zend_debug_alloc_output("Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n",
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))), MEM_BLOCK_END_MAGIC);
|
||||
zend_debug_alloc_output("%10s\t","");
|
||||
if (overflows>=sizeof(long)) {
|
||||
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
|
||||
@@ -611,7 +668,7 @@ ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
/* add the block to the persistent list */
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p->size+sizeof(zend_mem_header)+PLATFORM_PADDING;
|
||||
return REAL_SIZE(p->size)+sizeof(zend_mem_header)+PLATFORM_PADDING;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-5
@@ -18,15 +18,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ALLOC_H
|
||||
#define _ALLOC_H
|
||||
#ifndef ZEND_ALLOC_H
|
||||
#define ZEND_ALLOC_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
|
||||
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
|
||||
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
|
||||
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
|
||||
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
|
||||
|
||||
@@ -52,8 +52,10 @@ typedef union _align_test {
|
||||
long lng;
|
||||
} align_test;
|
||||
|
||||
#define MAX_CACHED_MEMORY 64
|
||||
#define MAX_CACHED_ENTRIES 16
|
||||
#define MAX_CACHED_MEMORY 11
|
||||
#define MAX_CACHED_ENTRIES 256
|
||||
#define PRE_INIT_CACHE_ENTRIES 32
|
||||
|
||||
#if (defined (__GNUC__) && __GNUC__ >= 2)
|
||||
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
|
||||
#else
|
||||
|
||||
+194
-37
@@ -33,6 +33,7 @@ static ZEND_FUNCTION(strlen);
|
||||
static ZEND_FUNCTION(strcmp);
|
||||
static ZEND_FUNCTION(strncmp);
|
||||
static ZEND_FUNCTION(strcasecmp);
|
||||
static ZEND_FUNCTION(strncasecmp);
|
||||
static ZEND_FUNCTION(each);
|
||||
static ZEND_FUNCTION(error_reporting);
|
||||
static ZEND_FUNCTION(define);
|
||||
@@ -52,9 +53,15 @@ static ZEND_FUNCTION(is_subclass_of);
|
||||
static ZEND_FUNCTION(get_class_vars);
|
||||
static ZEND_FUNCTION(get_object_vars);
|
||||
static ZEND_FUNCTION(get_class_methods);
|
||||
static ZEND_FUNCTION(user_error);
|
||||
static ZEND_FUNCTION(set_user_error_handler);
|
||||
static ZEND_FUNCTION(trigger_error);
|
||||
static ZEND_FUNCTION(set_error_handler);
|
||||
static ZEND_FUNCTION(restore_error_handler);
|
||||
static ZEND_FUNCTION(get_declared_classes);
|
||||
static ZEND_FUNCTION(create_function);
|
||||
static ZEND_FUNCTION(get_resource_type);
|
||||
#if ZEND_DEBUG
|
||||
static ZEND_FUNCTION(zend_test_func);
|
||||
#endif
|
||||
|
||||
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
|
||||
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
|
||||
@@ -70,6 +77,7 @@ static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(strcmp, NULL)
|
||||
ZEND_FE(strncmp, NULL)
|
||||
ZEND_FE(strcasecmp, NULL)
|
||||
ZEND_FE(strncasecmp, NULL)
|
||||
ZEND_FE(each, first_arg_force_ref)
|
||||
ZEND_FE(error_reporting, NULL)
|
||||
ZEND_FE(define, NULL)
|
||||
@@ -89,16 +97,23 @@ static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(get_class_vars, NULL)
|
||||
ZEND_FE(get_object_vars, NULL)
|
||||
ZEND_FE(get_class_methods, NULL)
|
||||
ZEND_FE(user_error, NULL)
|
||||
ZEND_FE(set_user_error_handler, NULL)
|
||||
ZEND_FE(trigger_error, NULL)
|
||||
ZEND_FALIAS(user_error, trigger_error, NULL)
|
||||
ZEND_FE(set_error_handler, NULL)
|
||||
ZEND_FE(restore_error_handler, NULL)
|
||||
ZEND_FE(get_declared_classes, NULL)
|
||||
ZEND_FE(create_function, NULL)
|
||||
ZEND_FE(get_resource_type, NULL)
|
||||
#if ZEND_DEBUG
|
||||
ZEND_FE(zend_test_func, NULL)
|
||||
#endif
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
int zend_startup_builtin_functions()
|
||||
{
|
||||
return zend_register_functions(builtin_functions, NULL);
|
||||
return zend_register_functions(builtin_functions, NULL, MODULE_PERSISTENT);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +223,7 @@ ZEND_FUNCTION(strlen)
|
||||
zval **str;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(str);
|
||||
RETVAL_LONG((*str)->value.str.len);
|
||||
@@ -222,7 +237,7 @@ ZEND_FUNCTION(strcmp)
|
||||
zval **s1, **s2;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
@@ -237,7 +252,7 @@ ZEND_FUNCTION(strncmp)
|
||||
zval **s1, **s2, **s3;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
@@ -253,7 +268,7 @@ ZEND_FUNCTION(strcasecmp)
|
||||
zval **s1, **s2;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
@@ -261,6 +276,22 @@ ZEND_FUNCTION(strcasecmp)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int strncasecmp(string str1, string str2, int len)
|
||||
Binary safe string comparison */
|
||||
ZEND_FUNCTION(strncasecmp)
|
||||
{
|
||||
zval **s1, **s2, **s3;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
convert_to_long_ex(s3);
|
||||
RETURN_LONG(zend_binary_zval_strncasecmp(*s1,*s2,*s3));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_FUNCTION(each)
|
||||
{
|
||||
zval **array,*entry,**entry_ptr, *tmp;
|
||||
@@ -270,7 +301,7 @@ ZEND_FUNCTION(each)
|
||||
HashTable *target_hash;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
target_hash = HASH_OF(*array);
|
||||
if (!target_hash) {
|
||||
@@ -328,10 +359,10 @@ ZEND_FUNCTION(error_reporting)
|
||||
EG(error_reporting)=(*arg)->value.lval;
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
RETVAL_LONG(old_error_reporting);
|
||||
}
|
||||
|
||||
@@ -360,9 +391,10 @@ ZEND_FUNCTION(define)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
break;
|
||||
}
|
||||
|
||||
switch((*val)->type) {
|
||||
case IS_LONG:
|
||||
case IS_DOUBLE:
|
||||
@@ -383,8 +415,11 @@ ZEND_FUNCTION(define)
|
||||
c.flags = case_sensitive; /* non persistent */
|
||||
c.name = zend_strndup((*var)->value.str.val, (*var)->value.str.len);
|
||||
c.name_len = (*var)->value.str.len+1;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
RETURN_TRUE;
|
||||
if(zend_register_constant(&c ELS_CC) == SUCCESS) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +429,7 @@ ZEND_FUNCTION(defined)
|
||||
zval c;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
convert_to_string_ex(var);
|
||||
@@ -413,7 +448,7 @@ ZEND_FUNCTION(get_class)
|
||||
zval **arg;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
if ((*arg)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
@@ -429,7 +464,7 @@ ZEND_FUNCTION(get_parent_class)
|
||||
zval **arg;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
|
||||
RETURN_FALSE;
|
||||
@@ -447,7 +482,7 @@ ZEND_FUNCTION(is_subclass_of)
|
||||
zend_class_entry *parent_ce = NULL;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &obj, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if ((*obj)->type != IS_OBJECT) {
|
||||
@@ -480,7 +515,7 @@ ZEND_FUNCTION(get_class_vars)
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
@@ -506,7 +541,7 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zval *tmp;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if ((*obj)->type != IS_OBJECT) {
|
||||
@@ -533,7 +568,7 @@ ZEND_FUNCTION(get_class_methods)
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
@@ -567,7 +602,7 @@ ZEND_FUNCTION(method_exists)
|
||||
char *lcname;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
if ((*klass)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
@@ -594,7 +629,7 @@ ZEND_FUNCTION(class_exists)
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(class_name);
|
||||
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
|
||||
@@ -618,7 +653,7 @@ ZEND_FUNCTION(function_exists)
|
||||
int retval;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(function_name);
|
||||
lcname = estrndup((*function_name)->value.str.val, (*function_name)->value.str.len);
|
||||
@@ -685,7 +720,7 @@ ZEND_FUNCTION(get_required_files)
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@@ -699,7 +734,7 @@ ZEND_FUNCTION(get_required_files)
|
||||
ZEND_FUNCTION(get_included_files)
|
||||
{
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@@ -708,9 +743,9 @@ ZEND_FUNCTION(get_included_files)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto void user_error(string messsage [, int error_type])
|
||||
/* {{{ proto void trigger_error(string messsage [, int error_type])
|
||||
Generates a user-level error/warning/notice message */
|
||||
ZEND_FUNCTION(user_error)
|
||||
ZEND_FUNCTION(trigger_error)
|
||||
{
|
||||
int error_type = E_USER_NOTICE;
|
||||
zval **z_error_type, **z_error_message;
|
||||
@@ -746,9 +781,12 @@ ZEND_FUNCTION(user_error)
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_FUNCTION(set_user_error_handler)
|
||||
/* {{{ proto string set_error_handler(string error_handler)
|
||||
Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */
|
||||
ZEND_FUNCTION(set_error_handler)
|
||||
{
|
||||
zval **error_handler;
|
||||
zend_bool had_orig_error_handler=0;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &error_handler)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
@@ -756,20 +794,53 @@ ZEND_FUNCTION(set_user_error_handler)
|
||||
|
||||
convert_to_string_ex(error_handler);
|
||||
if (EG(user_error_handler)) {
|
||||
zval_dtor(EG(user_error_handler));
|
||||
} else {
|
||||
ALLOC_ZVAL(EG(user_error_handler));
|
||||
had_orig_error_handler = 1;
|
||||
*return_value = *EG(user_error_handler);
|
||||
zval_copy_ctor(return_value);
|
||||
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
|
||||
}
|
||||
ALLOC_ZVAL(EG(user_error_handler));
|
||||
|
||||
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
|
||||
FREE_ZVAL(EG(user_error_handler));
|
||||
EG(user_error_handler) = NULL;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
*EG(user_error_handler) = **error_handler;
|
||||
zval_copy_ctor(EG(user_error_handler));
|
||||
|
||||
if (!had_orig_error_handler) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
/* {{{ proto void restore_error_handler(void)
|
||||
Restores the previously defined error handler function */
|
||||
ZEND_FUNCTION(restore_error_handler)
|
||||
{
|
||||
if (EG(user_error_handler)) {
|
||||
zval_ptr_dtor(&EG(user_error_handler));
|
||||
}
|
||||
if (zend_ptr_stack_num_elements(&EG(user_error_handlers))==0) {
|
||||
EG(user_error_handler) = NULL;
|
||||
} else {
|
||||
EG(user_error_handler) = zend_ptr_stack_pop(&EG(user_error_handlers));
|
||||
}
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
static int copy_class_name(zend_class_entry *ce, zval *array)
|
||||
|
||||
static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key)
|
||||
{
|
||||
add_next_index_stringl(array, ce->name, ce->name_length, 1);
|
||||
zval *array = va_arg(args, zval *);
|
||||
|
||||
if (hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) {
|
||||
add_next_index_stringl(array, ce->name, ce->name_length, 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -780,10 +851,96 @@ ZEND_FUNCTION(get_declared_classes)
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
WRONG_PARAM_COUNT;
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(CG(class_table), (apply_func_arg_t)copy_class_name, return_value);
|
||||
zend_hash_apply_with_arguments(CG(class_table), (apply_func_args_t)copy_class_name, 1, return_value);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
|
||||
|
||||
/* {{{ proto string create_function(string args, string code)
|
||||
Creates an anonymous function, and returns its name (funny, eh?) */
|
||||
ZEND_FUNCTION(create_function)
|
||||
{
|
||||
char *eval_code, *function_name;
|
||||
int eval_code_length, function_name_length;
|
||||
zval **z_function_args, **z_function_code;
|
||||
int retval;
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
convert_to_string_ex(z_function_args);
|
||||
convert_to_string_ex(z_function_code);
|
||||
|
||||
eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME)
|
||||
+Z_STRLEN_PP(z_function_args)
|
||||
+2 /* for the args parentheses */
|
||||
+2 /* for the curly braces */
|
||||
+Z_STRLEN_PP(z_function_code);
|
||||
|
||||
eval_code = (char *) emalloc(eval_code_length);
|
||||
sprintf(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code));
|
||||
|
||||
retval = zend_eval_string(eval_code, NULL CLS_CC ELS_CC);
|
||||
efree(eval_code);
|
||||
if (retval==SUCCESS) {
|
||||
zend_function *func;
|
||||
|
||||
if (zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **) &func)==FAILURE) {
|
||||
zend_error(E_ERROR, "Unexpected inconsistency in create_function()");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
function_add_ref(func);
|
||||
|
||||
function_name = (char *) emalloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG);
|
||||
|
||||
do {
|
||||
sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count));
|
||||
function_name_length = strlen(function_name+1)+1;
|
||||
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, func, sizeof(zend_function), NULL)==FAILURE);
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_STRINGL(function_name, function_name_length, 0);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
ZEND_FUNCTION(zend_test_func)
|
||||
{
|
||||
zval *arg1, *arg2;
|
||||
|
||||
zend_get_parameters(ht, 2, &arg1, &arg2);
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(get_resource_type)
|
||||
{
|
||||
char *resource_type;
|
||||
zval **z_resource_type;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_resource_type)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if (Z_TYPE_PP(z_resource_type) != IS_RESOURCE) {
|
||||
zend_error(E_WARNING, "Supplied argument is not a valid resource handle");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
resource_type = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(z_resource_type));
|
||||
if (resource_type) {
|
||||
RETURN_STRING(resource_type, 1);
|
||||
} else {
|
||||
RETURN_STRING("Unknown", 1);
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_BUILTIN_FUNCTIONS_H
|
||||
#define _ZEND_BUILTIN_FUNCTIONS_H
|
||||
#ifndef ZEND_BUILTIN_FUNCTIONS_H
|
||||
#define ZEND_BUILTIN_FUNCTIONS_H
|
||||
|
||||
int zend_startup_builtin_functions(void);
|
||||
|
||||
#endif /* _ZEND_BUILTIN_FUNCTIONS_H */
|
||||
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
|
||||
+96
-55
@@ -37,18 +37,6 @@ ZEND_API zend_executor_globals executor_globals;
|
||||
|
||||
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
|
||||
|
||||
static int is_not_internal_function(zend_function *function)
|
||||
{
|
||||
return(function->type != ZEND_INTERNAL_FUNCTION);
|
||||
}
|
||||
|
||||
|
||||
static int is_not_internal_class(zend_class_entry *ce)
|
||||
{
|
||||
return(ce->type != ZEND_INTERNAL_CLASS);
|
||||
}
|
||||
|
||||
|
||||
static void free_filename(void *p)
|
||||
{
|
||||
efree(*((char **) p));
|
||||
@@ -102,9 +90,6 @@ void init_compiler(CLS_D ELS_DC)
|
||||
zend_llist_init(&CG(list_llist), sizeof(list_llist_element), NULL, 0);
|
||||
zend_llist_init(&CG(dimension_llist), sizeof(int), NULL, 0);
|
||||
zend_llist_init(&CG(filenames_list), sizeof(char *), free_filename, 0);
|
||||
CG(short_tags) = ZEND_UV(short_tags);
|
||||
CG(asp_tags) = ZEND_UV(asp_tags);
|
||||
CG(allow_call_time_pass_reference) = ZEND_UV(allow_call_time_pass_reference);
|
||||
CG(handle_op_arrays) = 1;
|
||||
CG(in_compilation) = 0;
|
||||
zend_init_rsrc_list(ELS_C);
|
||||
@@ -124,8 +109,6 @@ void shutdown_compiler(CLS_D)
|
||||
zend_stack_destroy(&CG(object_stack));
|
||||
zend_stack_destroy(&CG(declare_stack));
|
||||
zend_llist_destroy(&CG(filenames_list));
|
||||
zend_hash_apply(CG(function_table), (int (*)(void *)) is_not_internal_function);
|
||||
zend_hash_apply(CG(class_table), (int (*)(void *)) is_not_internal_class);
|
||||
zend_llist_destroy(&CG(open_files));
|
||||
zend_hash_destroy(&CG(used_files));
|
||||
}
|
||||
@@ -533,8 +516,6 @@ void do_begin_variable_parse(CLS_D)
|
||||
{
|
||||
zend_llist fetch_list;
|
||||
|
||||
/* zend_llist_init(&fetch_list, sizeof(int), NULL, 0);
|
||||
zend_stack_push(&CG(bp_stack), (void *) &fetch_list, sizeof(zend_llist));*/
|
||||
zend_llist_init(&fetch_list, sizeof(zend_op), NULL, 0);
|
||||
zend_stack_push(&CG(bp_stack), (void *) &fetch_list, sizeof(zend_llist));
|
||||
}
|
||||
@@ -584,6 +565,27 @@ void do_end_variable_parse(int type, int arg_offset CLS_DC)
|
||||
}
|
||||
|
||||
|
||||
static zend_bool is_method_call(CLS_D)
|
||||
{
|
||||
zend_llist *fetch_list_ptr;
|
||||
zend_llist_element *cur;
|
||||
zend_op *cur_opline;
|
||||
|
||||
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
|
||||
|
||||
cur = fetch_list_ptr->head;
|
||||
/* There is always at least one node in the list */
|
||||
while (cur->next) {
|
||||
cur = cur->next;
|
||||
}
|
||||
cur_opline = (zend_op *)cur->data;
|
||||
if (cur_opline->opcode == ZEND_FETCH_OBJ_W) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void do_init_string(znode *result CLS_DC)
|
||||
{
|
||||
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
|
||||
@@ -764,6 +766,7 @@ void do_begin_function_declaration(znode *function_token, znode *function_name,
|
||||
|
||||
void do_end_function_declaration(znode *function_token CLS_DC)
|
||||
{
|
||||
do_extended_info(CLS_C);
|
||||
do_return(NULL, 0 CLS_CC);
|
||||
pass_two(CG(active_op_array));
|
||||
CG(active_op_array) = function_token->u.op_array;
|
||||
@@ -786,19 +789,21 @@ void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, un
|
||||
} else {
|
||||
SET_UNUSED(opline->op2);
|
||||
}
|
||||
if (pass_type==BYREF_FORCE && !CG(active_op_array)->arg_types) {
|
||||
int i;
|
||||
if (!CG(active_op_array)->arg_types) {
|
||||
if (pass_type==BYREF_FORCE) {
|
||||
int i;
|
||||
|
||||
CG(active_op_array)->arg_types = (unsigned char *) emalloc(sizeof(unsigned char)*(offset->u.constant.value.lval+1));
|
||||
for (i=1; i<offset->u.constant.value.lval; i++) {
|
||||
CG(active_op_array)->arg_types[i] = BYREF_NONE;
|
||||
CG(active_op_array)->arg_types = (unsigned char *) emalloc(sizeof(unsigned char)*(offset->u.constant.value.lval+1));
|
||||
for (i=1; i<offset->u.constant.value.lval; i++) {
|
||||
CG(active_op_array)->arg_types[i] = BYREF_NONE;
|
||||
}
|
||||
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
|
||||
CG(active_op_array)->arg_types[offset->u.constant.value.lval] = pass_type;
|
||||
}
|
||||
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
|
||||
}
|
||||
if (CG(active_op_array)->arg_types) {
|
||||
} else {
|
||||
CG(active_op_array)->arg_types = (unsigned char *) erealloc(CG(active_op_array)->arg_types, sizeof(unsigned char)*(offset->u.constant.value.lval+1));
|
||||
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
|
||||
CG(active_op_array)->arg_types[offset->u.constant.value.lval] = pass_type;
|
||||
CG(active_op_array)->arg_types[0]++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -830,6 +835,7 @@ int do_begin_function_call(znode *function_name CLS_DC)
|
||||
}
|
||||
break;
|
||||
}
|
||||
do_extended_fcall_begin(CLS_C);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -837,20 +843,30 @@ int do_begin_function_call(znode *function_name CLS_DC)
|
||||
void do_begin_dynamic_function_call(znode *function_name CLS_DC)
|
||||
{
|
||||
unsigned char *ptr = NULL;
|
||||
int last_op_number = get_next_op_number(CG(active_op_array))-1;
|
||||
int last_op_number;
|
||||
zend_op *last_op;
|
||||
|
||||
if (last_op_number>=0 && CG(active_op_array)->opcodes[last_op_number].opcode == ZEND_FETCH_OBJ_R) {
|
||||
CG(active_op_array)->opcodes[last_op_number].opcode = ZEND_INIT_FCALL_BY_NAME;
|
||||
CG(active_op_array)->opcodes[last_op_number].extended_value = ZEND_MEMBER_FUNC_CALL;
|
||||
if (function_name->op_type != IS_CONST && is_method_call(CLS_C)) {
|
||||
do_end_variable_parse(BP_VAR_W, 0 CLS_CC);
|
||||
last_op_number = get_next_op_number(CG(active_op_array))-1;
|
||||
last_op = &CG(active_op_array)->opcodes[last_op_number];
|
||||
last_op->opcode = ZEND_INIT_FCALL_BY_NAME;
|
||||
last_op->extended_value = ZEND_MEMBER_FUNC_CALL;
|
||||
} else {
|
||||
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
|
||||
|
||||
zend_op *opline;
|
||||
|
||||
if (function_name->op_type != IS_CONST) {
|
||||
do_end_variable_parse(BP_VAR_R, 0 CLS_CC);
|
||||
}
|
||||
|
||||
opline = get_next_op(CG(active_op_array) CLS_CC);
|
||||
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
|
||||
opline->op2 = *function_name;
|
||||
opline->extended_value = 0;
|
||||
SET_UNUSED(opline->op1);
|
||||
}
|
||||
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *));
|
||||
do_extended_fcall_begin(CLS_C);
|
||||
}
|
||||
|
||||
|
||||
@@ -861,6 +877,15 @@ void do_begin_class_member_function_call(znode *class_name, znode *function_name
|
||||
|
||||
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
|
||||
zend_str_tolower(class_name->u.constant.value.str.val, class_name->u.constant.value.str.len);
|
||||
if ((class_name->u.constant.value.str.len == sizeof("parent")-1)
|
||||
&& !memcmp(class_name->u.constant.value.str.val, "parent", sizeof("parent")-1)) {
|
||||
if (!CG(active_class_entry) || !CG(active_class_entry)->parent) {
|
||||
zend_error(E_COMPILE_ERROR, "No parent class available in this context");
|
||||
}
|
||||
efree(class_name->u.constant.value.str.val);
|
||||
class_name->u.constant.value.str.len = CG(active_class_entry)->parent->name_length;
|
||||
class_name->u.constant.value.str.val = estrndup(CG(active_class_entry)->parent->name, class_name->u.constant.value.str.len);
|
||||
}
|
||||
opline->op1 = *class_name;
|
||||
opline->op2 = *function_name;
|
||||
opline->extended_value = ZEND_MEMBER_FUNC_CALL;
|
||||
@@ -905,9 +930,9 @@ void do_pass_param(znode *param, int op, int offset CLS_DC)
|
||||
zend_error(E_COMPILE_WARNING,
|
||||
"Call-time pass-by-reference has been deprecated - argument passed by value; "
|
||||
"If you would like to pass it by reference, modify the declaration of %s(). "
|
||||
"If you would like to enable call-time pass-by-reference, you can set"
|
||||
"If you would like to enable call-time pass-by-reference, you can set "
|
||||
"allow_call_time_pass_reference to true in your INI file. "
|
||||
"However, future versions may not support this any longer.",
|
||||
"However, future versions may not support this any longer. ",
|
||||
(function_ptr?function_ptr->common.function_name:"[runtime function name]"),
|
||||
offset+1);
|
||||
}
|
||||
@@ -1038,7 +1063,7 @@ void do_return(znode *expr, int do_end_vparse CLS_DC)
|
||||
}
|
||||
|
||||
|
||||
static void function_add_ref(zend_function *function)
|
||||
ZEND_API void function_add_ref(zend_function *function)
|
||||
{
|
||||
if (function->type == ZEND_USER_FUNCTION) {
|
||||
zend_op_array *op_array = &function->op_array;
|
||||
@@ -1070,6 +1095,18 @@ static void do_inherit_parent_constructor(zend_class_entry *ce)
|
||||
}
|
||||
}
|
||||
|
||||
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
|
||||
{
|
||||
zend_function tmp_zend_function;
|
||||
zval *tmp;
|
||||
|
||||
/* Perform inheritance */
|
||||
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
|
||||
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
|
||||
ce->parent = parent_ce;
|
||||
do_inherit_parent_constructor(ce);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time)
|
||||
{
|
||||
@@ -1093,7 +1130,10 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
|
||||
case ZEND_DECLARE_CLASS: {
|
||||
zend_class_entry *ce;
|
||||
|
||||
zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
|
||||
if (zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce)==FAILURE) {
|
||||
zend_error(E_ERROR, "Internal Zend error - Missing class information for %s", opline->op1.u.constant.value.str.val);
|
||||
return FAILURE;
|
||||
}
|
||||
(*ce->refcount)++;
|
||||
if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, ce, sizeof(zend_class_entry), NULL)==FAILURE) {
|
||||
(*ce->refcount)--;
|
||||
@@ -1108,37 +1148,41 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
|
||||
break;
|
||||
case ZEND_DECLARE_INHERITED_CLASS: {
|
||||
zend_class_entry *ce, *parent_ce;
|
||||
int parent_name_length;
|
||||
char *class_name, *parent_name;
|
||||
zend_function tmp_zend_function;
|
||||
zval *tmp;
|
||||
int found_ce;
|
||||
|
||||
zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
|
||||
(*ce->refcount)++;
|
||||
|
||||
found_ce = zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
|
||||
|
||||
/* Restore base class / derived class names */
|
||||
parent_name = opline->op2.u.constant.value.str.val;
|
||||
class_name = strchr(opline->op2.u.constant.value.str.val, ':');
|
||||
if (!class_name) {
|
||||
zend_error(E_CORE_ERROR, "Invalid runtime class entry");
|
||||
}
|
||||
*class_name++ = 0;
|
||||
class_name++;
|
||||
|
||||
if (found_ce==FAILURE) {
|
||||
zend_error(E_ERROR, "Cannot redeclare class %s", class_name);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
(*ce->refcount)++;
|
||||
|
||||
/* Obtain parent class */
|
||||
if (zend_hash_find(class_table, parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
|
||||
parent_name_length = class_name - opline->op2.u.constant.value.str.val - 1;
|
||||
parent_name = estrndup(opline->op2.u.constant.value.str.val, parent_name_length);
|
||||
if (zend_hash_find(class_table, parent_name, parent_name_length+1, (void **) &parent_ce)==FAILURE) {
|
||||
if (!compile_time) {
|
||||
zend_error(E_ERROR, "Class %s: Cannot inherit from undefined class %s", class_name, parent_name);
|
||||
}
|
||||
(*ce->refcount)--;
|
||||
*(class_name-1) = ':';
|
||||
efree(parent_name);
|
||||
return FAILURE;
|
||||
}
|
||||
efree(parent_name);
|
||||
|
||||
/* Perform inheritance */
|
||||
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
|
||||
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
|
||||
ce->parent = parent_ce;
|
||||
do_inherit_parent_constructor(ce);
|
||||
|
||||
do_inheritance(ce, parent_ce);
|
||||
|
||||
/* Register the derived class */
|
||||
if (zend_hash_add(class_table, class_name, strlen(class_name)+1, ce, sizeof(zend_class_entry), NULL)==FAILURE) {
|
||||
@@ -1148,10 +1192,8 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
|
||||
(*ce->refcount)--;
|
||||
zend_hash_destroy(&ce->function_table);
|
||||
zend_hash_destroy(&ce->default_properties);
|
||||
*(class_name-1) = ':';
|
||||
return FAILURE;
|
||||
}
|
||||
*(class_name-1) = ':';
|
||||
return SUCCESS;
|
||||
}
|
||||
break;
|
||||
@@ -2288,7 +2330,6 @@ int zendlex(znode *zendlval CLS_DC)
|
||||
case T_COMMENT:
|
||||
case T_OPEN_TAG:
|
||||
case T_WHITESPACE:
|
||||
case T_PHP_TRACK_VARS:
|
||||
retval = zendlex(zendlval CLS_CC);
|
||||
break;
|
||||
case T_CLOSE_TAG:
|
||||
|
||||
+13
-4
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _COMPILE_H
|
||||
#define _COMPILE_H
|
||||
#ifndef ZEND_COMPILE_H
|
||||
#define ZEND_COMPILE_H
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <istream.h>
|
||||
#endif
|
||||
|
||||
#include "zend_llist.h"
|
||||
|
||||
#define DEBUG_ZEND 0
|
||||
@@ -191,7 +195,6 @@ typedef struct _zend_file_handle {
|
||||
} zend_file_handle;
|
||||
|
||||
|
||||
#include "zend_globals.h"
|
||||
|
||||
#define IS_CONST (1<<0)
|
||||
#define IS_TMP_VAR (1<<1)
|
||||
@@ -201,6 +204,8 @@ typedef struct _zend_file_handle {
|
||||
|
||||
#define EXT_TYPE_UNUSED (1<<0)
|
||||
|
||||
#include "zend_globals.h"
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
void init_compiler(CLS_D ELS_DC);
|
||||
@@ -211,6 +216,7 @@ extern ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file
|
||||
void zend_activate(CLS_D ELS_DC);
|
||||
void zend_deactivate(CLS_D ELS_DC);
|
||||
void zend_activate_modules(void);
|
||||
void zend_deactivate_modules(void);
|
||||
|
||||
|
||||
int lex_scan(zval *zendlval CLS_DC);
|
||||
@@ -285,6 +291,7 @@ void do_begin_class_member_function_call(znode *class_name, znode *function_name
|
||||
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
|
||||
void do_return(znode *expr, int do_end_vparse CLS_DC);
|
||||
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
|
||||
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
|
||||
void do_early_binding(CLS_D);
|
||||
|
||||
void do_pass_param(znode *param, int op, int offset CLS_DC);
|
||||
@@ -362,6 +369,8 @@ void do_extended_fcall_end(CLS_D);
|
||||
|
||||
void do_ticks(CLS_D);
|
||||
|
||||
ZEND_API void function_add_ref(zend_function *function);
|
||||
|
||||
#define INITIAL_OP_ARRAY_SIZE 64
|
||||
|
||||
|
||||
@@ -619,4 +628,4 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _COMPILE_H */
|
||||
#endif /* ZEND_COMPILE_H */
|
||||
+20
-4
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_CONFIG_W32_H
|
||||
#define _ZEND_CONFIG_W32_H
|
||||
#ifndef ZEND_CONFIG_W32_H
|
||||
#define ZEND_CONFIG_W32_H
|
||||
|
||||
|
||||
#include <string.h>
|
||||
@@ -42,6 +42,11 @@ typedef unsigned int uint;
|
||||
#define HAVE_STDIOSTR_H 1
|
||||
#define HAVE_CLASS_ISTDIOSTREAM
|
||||
#define istdiostream stdiostream
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
#define vsnprintf _vsnprintf
|
||||
|
||||
#ifdef inline
|
||||
#undef inline
|
||||
@@ -58,7 +63,7 @@ typedef unsigned int uint;
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
#define finite(A) _finite(A)
|
||||
#define zend_finite(A) _finite(A)
|
||||
|
||||
#ifdef LIBZEND_EXPORTS
|
||||
# define ZEND_API __declspec(dllexport)
|
||||
@@ -68,4 +73,15 @@ typedef unsigned int uint;
|
||||
|
||||
#define ZEND_DLEXPORT __declspec(dllexport)
|
||||
|
||||
#endif /* _ZEND_CONFIG_W32_H */
|
||||
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
|
||||
* (and requires _WIN32_WINNT to be defined, which prevents the resulting executable
|
||||
* from running under Windows 9x
|
||||
* Windows 9x should silently ignore it, so it's being used here directly
|
||||
*/
|
||||
#ifndef MB_SERVICE_NOTIFICATION
|
||||
#define MB_SERVICE_NOTIFICATION 0x00200000L
|
||||
#endif
|
||||
|
||||
#define ZEND_SERVICE_MB_STYLE (MB_TOPMOST|MB_SERVICE_NOTIFICATION)
|
||||
|
||||
#endif /* ZEND_CONFIG_W32_H */
|
||||
+11
-1
@@ -134,6 +134,12 @@ void zend_register_standard_constants(ELS_D)
|
||||
c.value.type = IS_BOOL;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
|
||||
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
|
||||
c.name_len = sizeof("ZEND_THREAD_SAFE");
|
||||
c.value.value.lval = ZTS_V;
|
||||
c.value.type = IS_BOOL;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
|
||||
c.name = zend_strndup(ZEND_STRL("NULL"));
|
||||
c.name_len = sizeof("NULL");
|
||||
c.value.type = IS_NULL;
|
||||
@@ -233,9 +239,10 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_register_constant(zend_constant *c ELS_DC)
|
||||
ZEND_API int zend_register_constant(zend_constant *c ELS_DC)
|
||||
{
|
||||
char *lowercase_name = zend_strndup(c->name, c->name_len);
|
||||
int ret = SUCCESS;
|
||||
|
||||
#if 0
|
||||
printf("Registering constant for module %d\n",c->module_number);
|
||||
@@ -244,8 +251,11 @@ ZEND_API void zend_register_constant(zend_constant *c ELS_DC)
|
||||
zend_str_tolower(lowercase_name, c->name_len);
|
||||
if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
|
||||
zval_dtor(&c->value);
|
||||
zend_error(E_NOTICE,"Constant %s already defined",lowercase_name);
|
||||
ret = FAILURE;
|
||||
}
|
||||
free(lowercase_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CONSTANTS_H
|
||||
#define _CONSTANTS_H
|
||||
#ifndef ZEND_CONSTANTS_H
|
||||
#define ZEND_CONSTANTS_H
|
||||
|
||||
#include "zend_globals.h"
|
||||
|
||||
@@ -55,7 +55,7 @@ ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval,
|
||||
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC);
|
||||
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC);
|
||||
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC);
|
||||
ZEND_API void zend_register_constant(zend_constant *c ELS_DC);
|
||||
ZEND_API int zend_register_constant(zend_constant *c ELS_DC);
|
||||
void zend_copy_constants(HashTable *target, HashTable *sourc);
|
||||
void copy_zend_constant(zend_constant *c);
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DYNAMIC_ARRAY_H
|
||||
#define _DYNAMIC_ARRAY_H
|
||||
#ifndef ZEND_DYNAMIC_ARRAY_H
|
||||
#define ZEND_DYNAMIC_ARRAY_H
|
||||
|
||||
typedef struct _dynamic_array {
|
||||
char *array;
|
||||
@@ -35,4 +35,4 @@ ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
|
||||
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _ZEND_DYNAMIC_ARRAY_H */
|
||||
#endif /* ZEND_DYNAMIC_ARRAY_H */
|
||||
+3
-3
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_ERRORS_H
|
||||
#define _ZEND_ERRORS_H
|
||||
#ifndef ZEND_ERRORS_H
|
||||
#define ZEND_ERRORS_H
|
||||
|
||||
#define E_ERROR (1<<0L)
|
||||
#define E_WARNING (1<<1L)
|
||||
@@ -36,5 +36,5 @@
|
||||
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
|
||||
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
|
||||
|
||||
#endif /* _ZEND_ERRORS_H */
|
||||
#endif /* ZEND_ERRORS_H */
|
||||
|
||||
+90
-136
@@ -65,14 +65,6 @@ static void zend_extension_statement_handler(zend_extension *extension, zend_op_
|
||||
static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array);
|
||||
static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array);
|
||||
|
||||
|
||||
|
||||
#define SEPARATE_ON_READ_OBJECT(obj, _type) \
|
||||
if ((obj) && ((_type) == BP_VAR_R) && ((*(obj))->type == IS_OBJECT)) { \
|
||||
SEPARATE_ZVAL_IF_NOT_REF((obj)); \
|
||||
(*(obj))->is_ref = 1; \
|
||||
}
|
||||
|
||||
#define RETURN_VALUE_USED(opline) (!((opline)->result.u.EA.type & EXT_TYPE_UNUSED))
|
||||
|
||||
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_free ELS_DC)
|
||||
@@ -142,10 +134,11 @@ static inline zval *_get_object_zval_ptr(znode *node, temp_variable *Ts, int *sh
|
||||
return &Ts[node->u.var].tmp_var;
|
||||
break;
|
||||
case IS_VAR:
|
||||
if (Ts[node->u.var].var.ptr) {
|
||||
PZVAL_UNLOCK(Ts[node->u.var].var.ptr);
|
||||
if (Ts[node->u.var].var.ptr_ptr) {
|
||||
PZVAL_UNLOCK(*Ts[node->u.var].var.ptr_ptr);
|
||||
*should_free = 0;
|
||||
return Ts[node->u.var].var.ptr;
|
||||
SEPARATE_ZVAL_IF_NOT_REF(Ts[node->u.var].var.ptr_ptr);
|
||||
return *Ts[node->u.var].var.ptr_ptr;
|
||||
} else {
|
||||
if (Ts[node->u.var].EA.type==IS_STRING_OFFSET) {
|
||||
PZVAL_UNLOCK(Ts[node->u.var].EA.data.str_offset.str);
|
||||
@@ -347,16 +340,6 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
if (variable_ptr->refcount==0) {
|
||||
switch (type) {
|
||||
case IS_VAR:
|
||||
/*
|
||||
if (PZVAL_IS_LOCKED(value)) {
|
||||
zval *orig_value = value;
|
||||
|
||||
ALLOC_ZVAL(value);
|
||||
*value = *orig_value;
|
||||
value->refcount=0;
|
||||
zval_copy_ctor(value);
|
||||
}
|
||||
*/
|
||||
/* break missing intentionally */
|
||||
case IS_CONST:
|
||||
if (variable_ptr==value) {
|
||||
@@ -386,16 +369,6 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
} else { /* we need to split */
|
||||
switch (type) {
|
||||
case IS_VAR:
|
||||
/*
|
||||
if (PZVAL_IS_LOCKED(value)) {
|
||||
zval *orig_value = value;
|
||||
|
||||
ALLOC_ZVAL(value);
|
||||
*value = *orig_value;
|
||||
value->refcount=0;
|
||||
zval_copy_ctor(value);
|
||||
}
|
||||
*/
|
||||
/* break missing intentionally */
|
||||
case IS_CONST:
|
||||
if (PZVAL_IS_REF(value) && value->refcount > 0) {
|
||||
@@ -516,14 +489,13 @@ static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_v
|
||||
if (op2->u.fetch_type == ZEND_FETCH_LOCAL) {
|
||||
FREE_OP(op1, free_op1);
|
||||
} else if (op2->u.fetch_type == ZEND_FETCH_STATIC) {
|
||||
zval_update_constant(retval);
|
||||
zval_update_constant(retval, (void *) 1);
|
||||
}
|
||||
|
||||
if (varname == &tmp_varname) {
|
||||
zval_dtor(varname);
|
||||
}
|
||||
Ts[result->u.var].var.ptr_ptr = retval;
|
||||
SEPARATE_ON_READ_OBJECT(retval, type);
|
||||
SELECTIVE_PZVAL_LOCK(*retval, result);
|
||||
}
|
||||
|
||||
@@ -670,13 +642,8 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
case BP_VAR_RW:
|
||||
case BP_VAR_W:
|
||||
if (!PZVAL_IS_REF(container)) {
|
||||
container->refcount--;
|
||||
if (container->refcount>0) {
|
||||
ALLOC_ZVAL(container);
|
||||
*container_ptr = container;
|
||||
container->is_ref=0;
|
||||
}
|
||||
container->refcount=1;
|
||||
SEPARATE_ZVAL(container_ptr);
|
||||
container = *container_ptr;
|
||||
}
|
||||
array_init(container);
|
||||
break;
|
||||
@@ -686,12 +653,8 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
switch (container->type) {
|
||||
case IS_ARRAY:
|
||||
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
|
||||
container->refcount--;
|
||||
ALLOC_ZVAL(*container_ptr);
|
||||
**container_ptr = *container;
|
||||
SEPARATE_ZVAL(container_ptr);
|
||||
container = *container_ptr;
|
||||
INIT_PZVAL(container);
|
||||
zendi_zval_copy_ctor(*container);
|
||||
}
|
||||
if (op2->op_type == IS_UNUSED) {
|
||||
zval *new_zval = &EG(uninitialized_zval);
|
||||
@@ -701,7 +664,6 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
} else {
|
||||
*retval = zend_fetch_dimension_address_inner(container->value.ht, op2, Ts, type ELS_CC);
|
||||
}
|
||||
SEPARATE_ON_READ_OBJECT(*retval, type);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
break;
|
||||
case IS_NULL:
|
||||
@@ -855,13 +817,8 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
case BP_VAR_RW:
|
||||
case BP_VAR_W:
|
||||
if (!PZVAL_IS_REF(container)) {
|
||||
container->refcount--;
|
||||
if (container->refcount>0) {
|
||||
ALLOC_ZVAL(container);
|
||||
*container_ptr = container;
|
||||
container->is_ref=0;
|
||||
}
|
||||
container->refcount=1;
|
||||
SEPARATE_ZVAL(container_ptr);
|
||||
container = *container_ptr;
|
||||
}
|
||||
object_init(container);
|
||||
break;
|
||||
@@ -884,15 +841,10 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
|
||||
|
||||
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
|
||||
container->refcount--;
|
||||
ALLOC_ZVAL(*container_ptr);
|
||||
**container_ptr = *container;
|
||||
SEPARATE_ZVAL(container_ptr);
|
||||
container = *container_ptr;
|
||||
INIT_PZVAL(container);
|
||||
zendi_zval_copy_ctor(*container);
|
||||
}
|
||||
*retval = zend_fetch_property_address_inner(container->value.obj.properties, op2, Ts, type ELS_CC);
|
||||
SEPARATE_ON_READ_OBJECT(*retval, type);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
}
|
||||
|
||||
@@ -1012,6 +964,11 @@ void execute(zend_op_array *op_array ELS_DC)
|
||||
while (opline<end) {
|
||||
#else
|
||||
while (1) {
|
||||
#endif
|
||||
#ifdef ZEND_WIN32
|
||||
if (EG(timed_out)) {
|
||||
zend_timeout(0);
|
||||
}
|
||||
#endif
|
||||
switch(opline->opcode) {
|
||||
case ZEND_ADD:
|
||||
@@ -1128,17 +1085,9 @@ binary_assign_op_addr: {
|
||||
opline++;
|
||||
continue;
|
||||
}
|
||||
if (!PZVAL_IS_REF(*var_ptr)) {
|
||||
if ((*var_ptr)->refcount>1) {
|
||||
zval *orig_var=*var_ptr;
|
||||
|
||||
(*var_ptr)->refcount--;
|
||||
ALLOC_ZVAL(*var_ptr);
|
||||
**var_ptr = *orig_var;
|
||||
zendi_zval_copy_ctor(**var_ptr);
|
||||
(*var_ptr)->refcount=1;
|
||||
}
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
|
||||
|
||||
EG(binary_op)(*var_ptr, *var_ptr, get_zval_ptr(&opline->op2, Ts, &EG(free_op2), BP_VAR_R));
|
||||
Ts[opline->result.u.var].var.ptr_ptr = var_ptr;
|
||||
SELECTIVE_PZVAL_LOCK(*var_ptr, &opline->result);
|
||||
@@ -1173,17 +1122,9 @@ binary_assign_op_addr: {
|
||||
zendi_zval_copy_ctor(Ts[opline->result.u.var].tmp_var);
|
||||
break;
|
||||
}
|
||||
if (!PZVAL_IS_REF(*var_ptr)) {
|
||||
if ((*var_ptr)->refcount>1) {
|
||||
zval *orig_var = *var_ptr;
|
||||
|
||||
(*var_ptr)->refcount--;
|
||||
ALLOC_ZVAL(*var_ptr);
|
||||
**var_ptr = *orig_var;
|
||||
zendi_zval_copy_ctor(**var_ptr);
|
||||
(*var_ptr)->refcount=1;
|
||||
}
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
|
||||
|
||||
incdec_op(*var_ptr);
|
||||
switch (opline->opcode) {
|
||||
case ZEND_PRE_INC:
|
||||
@@ -1317,7 +1258,7 @@ binary_assign_op_addr: {
|
||||
zval *value;
|
||||
value = get_zval_ptr(&opline->op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
|
||||
zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (EG(free_op2)?IS_TMP_VAR:opline->op2.op_type), Ts ELS_CC);
|
||||
zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (EG(free_op2)?IS_TMP_VAR:opline->op2.op_type), Ts ELS_CC);
|
||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
@@ -1529,6 +1470,10 @@ binary_assign_op_addr: {
|
||||
if (!object.ptr || object.ptr->type != IS_OBJECT) {
|
||||
zend_error(E_ERROR, "Call to a member function on a non-object");
|
||||
}
|
||||
if (!object.ptr->is_ref && object.ptr->refcount > 1) {
|
||||
zend_error(E_ERROR, "Bug: Problem in method call\n");
|
||||
}
|
||||
object.ptr->is_ref=1;
|
||||
object.ptr->refcount++; /* For $this pointer */
|
||||
active_function_table = &(object.ptr->value.obj.ce->function_table);
|
||||
}
|
||||
@@ -1658,10 +1603,8 @@ do_fcall_common:
|
||||
|
||||
retval_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
|
||||
|
||||
if (!PZVAL_IS_REF(*retval_ptr_ptr)) {
|
||||
SEPARATE_ZVAL(retval_ptr_ptr);
|
||||
(*retval_ptr_ptr)->is_ref = 1;
|
||||
}
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
|
||||
|
||||
(*retval_ptr_ptr)->refcount++;
|
||||
(*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
|
||||
} else {
|
||||
@@ -1744,21 +1687,8 @@ send_by_ref:
|
||||
zend_error(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
|
||||
if (!PZVAL_IS_REF(varptr)) {
|
||||
/* code to break away this variable */
|
||||
if (varptr->refcount>1) {
|
||||
varptr->refcount--;
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
**varptr_ptr = *varptr;
|
||||
varptr = *varptr_ptr;
|
||||
varptr->refcount = 1;
|
||||
zval_copy_ctor(varptr);
|
||||
}
|
||||
varptr->is_ref = 1;
|
||||
/* at the end of this code refcount is always 1 */
|
||||
}
|
||||
varptr->refcount++;
|
||||
zend_ptr_stack_push(&EG(argument_stack), varptr);
|
||||
}
|
||||
@@ -1767,7 +1697,7 @@ send_by_ref:
|
||||
zval **param;
|
||||
|
||||
if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) ¶m ELS_CC)==FAILURE) {
|
||||
zend_error(E_NOTICE, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name());
|
||||
zend_error(E_WARNING, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name());
|
||||
if (opline->result.op_type == IS_VAR) {
|
||||
PZVAL_UNLOCK(*Ts[opline->result.u.var].var.ptr_ptr);
|
||||
}
|
||||
@@ -1782,18 +1712,15 @@ send_by_ref:
|
||||
zval **param, *assignment_value;
|
||||
|
||||
if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) ¶m ELS_CC)==FAILURE) {
|
||||
if (opline->op2.u.constant.type == IS_CONSTANT) {
|
||||
if (opline->op2.u.constant.type == IS_CONSTANT || opline->op2.u.constant.type==IS_CONSTANT_ARRAY) {
|
||||
zval *default_value;
|
||||
zval tmp;
|
||||
|
||||
ALLOC_ZVAL(default_value);
|
||||
*default_value = opline->op2.u.constant;
|
||||
if (!zend_get_constant(default_value->value.str.val, default_value->value.str.len, &tmp)) {
|
||||
default_value->type = IS_STRING;
|
||||
if (opline->op2.u.constant.type==IS_CONSTANT_ARRAY) {
|
||||
zval_copy_ctor(default_value);
|
||||
} else {
|
||||
*default_value = tmp;
|
||||
}
|
||||
zval_update_constant(&default_value, 0);
|
||||
default_value->refcount=0;
|
||||
default_value->is_ref=0;
|
||||
param = &default_value;
|
||||
@@ -1806,7 +1733,7 @@ send_by_ref:
|
||||
assignment_value = *param;
|
||||
}
|
||||
|
||||
if (PZVAL_IS_REF(assignment_value)) {
|
||||
if (PZVAL_IS_REF(assignment_value) && param) {
|
||||
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC);
|
||||
} else {
|
||||
zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, Ts ELS_CC);
|
||||
@@ -1946,7 +1873,7 @@ send_by_ref:
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
}
|
||||
if (opline->op1.op_type == IS_TMP_VAR) { /* temporary variable */
|
||||
if (!opline->extended_value && EG(free_op1)) { /* temporary variable */
|
||||
zval *new_expr;
|
||||
|
||||
ALLOC_ZVAL(new_expr);
|
||||
@@ -1955,11 +1882,8 @@ send_by_ref:
|
||||
INIT_PZVAL(expr_ptr);
|
||||
} else {
|
||||
if (opline->extended_value) {
|
||||
if (!PZVAL_IS_REF(expr_ptr)) {
|
||||
SEPARATE_ZVAL(expr_ptr_ptr);
|
||||
expr_ptr = *expr_ptr_ptr;
|
||||
expr_ptr->is_ref = 1;
|
||||
}
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
|
||||
expr_ptr = *expr_ptr_ptr;
|
||||
expr_ptr->refcount++;
|
||||
} else if (PZVAL_IS_REF(expr_ptr)) {
|
||||
zval *new_expr;
|
||||
@@ -2031,7 +1955,16 @@ send_by_ref:
|
||||
zend_op_array *new_op_array=NULL;
|
||||
zval **original_return_value = EG(return_value_ptr_ptr);
|
||||
int return_value_used;
|
||||
zval *inc_filename = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
zval tmp_inc_filename;
|
||||
CLS_FETCH();
|
||||
|
||||
if (inc_filename->type!=IS_STRING) {
|
||||
tmp_inc_filename = *inc_filename;
|
||||
zval_copy_ctor(&tmp_inc_filename);
|
||||
convert_to_string(&tmp_inc_filename);
|
||||
inc_filename = &tmp_inc_filename;
|
||||
}
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
@@ -2039,21 +1972,17 @@ send_by_ref:
|
||||
case ZEND_INCLUDE_ONCE: {
|
||||
char *opened_path;
|
||||
int dummy = 1;
|
||||
zval *inc_filename = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
zval tmp_inc_filename;
|
||||
zend_file_handle file_handle;
|
||||
|
||||
if (inc_filename->type!=IS_STRING) {
|
||||
tmp_inc_filename = *inc_filename;
|
||||
zval_copy_ctor(&tmp_inc_filename);
|
||||
convert_to_string(&tmp_inc_filename);
|
||||
inc_filename = &tmp_inc_filename;
|
||||
}
|
||||
|
||||
file_handle.handle.fp = zend_fopen(inc_filename->value.str.val, &opened_path);
|
||||
file_handle.type = ZEND_HANDLE_FP;
|
||||
file_handle.filename = inc_filename->value.str.val;
|
||||
file_handle.free_filename = 0;
|
||||
if (opened_path) {
|
||||
file_handle.filename = opened_path;
|
||||
file_handle.free_filename = 0;
|
||||
} else {
|
||||
file_handle.filename = inc_filename->value.str.val;
|
||||
file_handle.free_filename = 0;
|
||||
}
|
||||
|
||||
if (file_handle.handle.fp) {
|
||||
if (!opened_path || zend_hash_add(&EG(included_files), opened_path, strlen(opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) {
|
||||
@@ -2066,28 +1995,32 @@ send_by_ref:
|
||||
} else {
|
||||
fclose(file_handle.handle.fp);
|
||||
}
|
||||
if (opened_path) {
|
||||
free(opened_path);
|
||||
}
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle.filename);
|
||||
}
|
||||
if (opened_path) {
|
||||
free (opened_path);
|
||||
}
|
||||
break;
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(opline->op2.u.constant.value.lval, get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC ELS_CC);
|
||||
{
|
||||
new_op_array = compile_filename(opline->op2.u.constant.value.lval, inc_filename CLS_CC ELS_CC);
|
||||
if (new_op_array) {
|
||||
pass_include_eval(new_op_array);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ZEND_EVAL:
|
||||
new_op_array = compile_string(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC);
|
||||
new_op_array = compile_string(inc_filename CLS_CC);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
FREE_OP(&opline->op1, EG(free_op1));
|
||||
Ts[opline->result.u.var].var.ptr = NULL;
|
||||
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
|
||||
@@ -2149,6 +2082,8 @@ send_by_ref:
|
||||
if (container) {
|
||||
HashTable *ht;
|
||||
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
|
||||
switch ((*container)->type) {
|
||||
case IS_ARRAY:
|
||||
ht = (*container)->value.ht;
|
||||
@@ -2160,14 +2095,32 @@ send_by_ref:
|
||||
ht = NULL;
|
||||
break;
|
||||
}
|
||||
if (ht) {
|
||||
if (ht) {
|
||||
switch (offset->type) {
|
||||
case IS_DOUBLE:
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
zend_hash_index_del(ht, offset->value.lval);
|
||||
break;
|
||||
{
|
||||
long index;
|
||||
|
||||
if (offset->type == IS_DOUBLE) {
|
||||
index = (long) offset->value.lval;
|
||||
} else {
|
||||
index = offset->value.lval;
|
||||
}
|
||||
zend_hash_index_del(ht, index);
|
||||
break;
|
||||
}
|
||||
case IS_STRING:
|
||||
zend_hash_del(ht, offset->value.str.val, offset->value.str.len+1);
|
||||
break;
|
||||
case IS_NULL:
|
||||
zend_hash_del(ht, "", sizeof(""));
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING, "Illegal offset type in unset");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2362,6 +2315,7 @@ send_by_ref:
|
||||
case ZEND_NOP:
|
||||
NEXT_OPCODE();
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
|
||||
}
|
||||
}
|
||||
#if SUPPORT_INTERACTIVE
|
||||
|
||||
+156
-9
@@ -18,11 +18,13 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _EXECUTE_H
|
||||
#define _EXECUTE_H
|
||||
#ifndef ZEND_EXECUTE_H
|
||||
#define ZEND_EXECUTE_H
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend_hash.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_execute_locks.h"
|
||||
|
||||
typedef union _temp_variable {
|
||||
zval tmp_var;
|
||||
@@ -52,15 +54,95 @@ void init_executor(CLS_D ELS_DC);
|
||||
void shutdown_executor(ELS_D);
|
||||
void execute(zend_op_array *op_array ELS_DC);
|
||||
ZEND_API int zend_is_true(zval *op);
|
||||
ZEND_API inline void safe_free_zval_ptr(zval *p);
|
||||
ZEND_API inline void safe_free_zval_ptr(zval *p)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
if (p!=EG(uninitialized_zval_ptr)) {
|
||||
FREE_ZVAL(p);
|
||||
}
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
|
||||
ZEND_API inline int i_zend_is_true(zval *op);
|
||||
ZEND_API int zval_update_constant(zval **pp);
|
||||
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
|
||||
ZEND_API inline int i_zend_is_true(zval *op)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
int result;
|
||||
|
||||
switch (op->type) {
|
||||
case IS_NULL:
|
||||
result = 0;
|
||||
break;
|
||||
case IS_LONG:
|
||||
case IS_BOOL:
|
||||
case IS_RESOURCE:
|
||||
result = (op->value.lval?1:0);
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
result = (op->value.dval ? 1 : 0);
|
||||
break;
|
||||
case IS_STRING:
|
||||
if (op->value.str.len == 0
|
||||
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
|
||||
result = 0;
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
result = (zend_hash_num_elements(op->value.ht)?1:0);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int zval_update_constant(zval **pp, void *arg);
|
||||
|
||||
/* dedicated Zend executor functions - do not use! */
|
||||
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D);
|
||||
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC);
|
||||
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int delete_count = (ulong) *p;
|
||||
|
||||
EG(argument_stack).top -= (delete_count+2);
|
||||
while (--delete_count>=0) {
|
||||
zval_ptr_dtor((zval **) --p);
|
||||
}
|
||||
EG(argument_stack).top_element = p;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int arg_count = (ulong) *p;
|
||||
|
||||
if (requested_arg>arg_count) {
|
||||
return FAILURE;
|
||||
}
|
||||
*data = (p-arg_count+requested_arg-1);
|
||||
return SUCCESS;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
#if SUPPORT_INTERACTIVE
|
||||
void execute_new_code(CLS_D);
|
||||
@@ -73,13 +155,78 @@ ZEND_API char *zend_get_executed_filename(ELS_D);
|
||||
ZEND_API uint zend_get_executed_lineno(ELS_D);
|
||||
ZEND_API zend_bool zend_is_executing(void);
|
||||
|
||||
void zend_set_timeout(long seconds);
|
||||
void zend_unset_timeout(void);
|
||||
ZEND_API void zend_timeout(int dummy);
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
void zend_init_timeout_thread();
|
||||
void zend_shutdown_timeout_thread();
|
||||
#define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
|
||||
#define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
|
||||
#endif
|
||||
|
||||
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
|
||||
#define zendi_zval_dtor(p) zval_dtor(&(p))
|
||||
|
||||
#define active_opline (*EG(opline_ptr))
|
||||
|
||||
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
zval *variable_ptr = *variable_ptr_ptr;
|
||||
zval *value_ptr;
|
||||
|
||||
|
||||
if (!value_ptr_ptr) {
|
||||
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
|
||||
return;
|
||||
}
|
||||
|
||||
value_ptr = *value_ptr_ptr;
|
||||
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
|
||||
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
|
||||
} else if (variable_ptr_ptr != value_ptr_ptr) {
|
||||
variable_ptr->refcount--;
|
||||
if (variable_ptr->refcount==0) {
|
||||
zendi_zval_dtor(*variable_ptr);
|
||||
FREE_ZVAL(variable_ptr);
|
||||
}
|
||||
|
||||
if (!PZVAL_IS_REF(value_ptr)) {
|
||||
/* break it away */
|
||||
value_ptr->refcount--;
|
||||
if (value_ptr->refcount>0) {
|
||||
ALLOC_ZVAL(*value_ptr_ptr);
|
||||
**value_ptr_ptr = *value_ptr;
|
||||
value_ptr = *value_ptr_ptr;
|
||||
zendi_zval_copy_ctor(*value_ptr);
|
||||
}
|
||||
value_ptr->refcount = 1;
|
||||
value_ptr->is_ref = 1;
|
||||
}
|
||||
|
||||
*variable_ptr_ptr = value_ptr;
|
||||
value_ptr->refcount++;
|
||||
} else {
|
||||
if (variable_ptr->refcount>1) { /* we need to break away */
|
||||
SEPARATE_ZVAL(variable_ptr_ptr);
|
||||
}
|
||||
(*variable_ptr_ptr)->is_ref = 1;
|
||||
}
|
||||
|
||||
if (result && (result->op_type != IS_UNUSED)) {
|
||||
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
|
||||
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
|
||||
AI_USE_PTR(Ts[result->u.var].var);
|
||||
}
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
#define IS_OVERLOADED_OBJECT 1
|
||||
#define IS_STRING_OFFSET 2
|
||||
|
||||
#endif /* _EXECUTE_H */
|
||||
#endif /* ZEND_EXECUTE_H */
|
||||
+236
-128
@@ -29,10 +29,23 @@
|
||||
#include "zend_constants.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "zend_execute_locks.h"
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
#include <process.h>
|
||||
/* true global */
|
||||
static WNDCLASS wc;
|
||||
static HWND timeout_window;
|
||||
static HANDLE timeout_thread_event;
|
||||
static DWORD timeout_thread_id;
|
||||
static int timeout_thread_initialized=0;
|
||||
#endif
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
static void (*original_sigsegv_handler)(int);
|
||||
@@ -78,6 +91,18 @@ static void zend_extension_deactivator(zend_extension *extension)
|
||||
}
|
||||
|
||||
|
||||
static int is_not_internal_function(zend_function *function)
|
||||
{
|
||||
return(function->type != ZEND_INTERNAL_FUNCTION);
|
||||
}
|
||||
|
||||
|
||||
static int is_not_internal_class(zend_class_entry *ce)
|
||||
{
|
||||
return(ce->type != ZEND_INTERNAL_CLASS);
|
||||
}
|
||||
|
||||
|
||||
void init_executor(CLS_D ELS_DC)
|
||||
{
|
||||
INIT_ZVAL(EG(uninitialized_zval));
|
||||
@@ -117,6 +142,14 @@ void init_executor(CLS_D ELS_DC)
|
||||
EG(ticks_count) = 0;
|
||||
|
||||
EG(user_error_handler) = NULL;
|
||||
|
||||
zend_ptr_stack_init(&EG(user_error_handlers));
|
||||
|
||||
EG(orig_error_reporting) = EG(error_reporting);
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
EG(timed_out) = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -144,13 +177,20 @@ void shutdown_executor(ELS_D)
|
||||
}
|
||||
}
|
||||
|
||||
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table is destroyed */
|
||||
|
||||
zend_ptr_stack_destroy(&EG(argument_stack));
|
||||
|
||||
/* Destroy all op arrays */
|
||||
if (EG(main_op_array)) {
|
||||
destroy_op_array(EG(main_op_array));
|
||||
efree(EG(main_op_array));
|
||||
}
|
||||
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
|
||||
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
|
||||
|
||||
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table and
|
||||
* op arrays are destroyed.
|
||||
*/
|
||||
|
||||
clean_non_persistent_constants();
|
||||
#if ZEND_DEBUG
|
||||
signal(SIGSEGV, original_sigsegv_handler);
|
||||
@@ -162,6 +202,11 @@ void shutdown_executor(ELS_D)
|
||||
zval_dtor(EG(user_error_handler));
|
||||
FREE_ZVAL(EG(user_error_handler));
|
||||
}
|
||||
|
||||
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
|
||||
zend_ptr_stack_destroy(&EG(user_error_handlers));
|
||||
|
||||
EG(error_reporting) = EG(orig_error_reporting);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,16 +262,6 @@ ZEND_API zend_bool zend_is_executing()
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline void safe_free_zval_ptr(zval *p)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
if (p!=EG(uninitialized_zval_ptr)) {
|
||||
FREE_ZVAL(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#if DEBUG_ZEND>=2
|
||||
@@ -242,53 +277,16 @@ ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int i_zend_is_true(zval *op)
|
||||
{
|
||||
int result;
|
||||
|
||||
switch (op->type) {
|
||||
case IS_NULL:
|
||||
result = 0;
|
||||
break;
|
||||
case IS_LONG:
|
||||
case IS_BOOL:
|
||||
case IS_RESOURCE:
|
||||
result = (op->value.lval?1:0);
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
result = (op->value.dval ? 1 : 0);
|
||||
break;
|
||||
case IS_STRING:
|
||||
if (op->value.str.len == 0
|
||||
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
|
||||
result = 0;
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
result = (zend_hash_num_elements(op->value.ht)?1:0);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_is_true(zval *op)
|
||||
{
|
||||
return i_zend_is_true(op);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zval_update_constant(zval **pp)
|
||||
ZEND_API int zval_update_constant(zval **pp, void *arg)
|
||||
{
|
||||
zval *p = *pp;
|
||||
zend_bool inline_change = (zend_bool) (unsigned long) arg;
|
||||
|
||||
if (p->type == IS_CONSTANT) {
|
||||
zval c;
|
||||
@@ -304,16 +302,22 @@ ZEND_API int zval_update_constant(zval **pp)
|
||||
p->value.str.val,
|
||||
p->value.str.val);
|
||||
p->type = IS_STRING;
|
||||
if (!inline_change) {
|
||||
zval_copy_ctor(p);
|
||||
}
|
||||
} else {
|
||||
STR_FREE(p->value.str.val);
|
||||
if (inline_change) {
|
||||
STR_FREE(p->value.str.val);
|
||||
}
|
||||
*p = c;
|
||||
}
|
||||
INIT_PZVAL(p);
|
||||
p->refcount = refcount;
|
||||
} else if (p->type == IS_ARRAY) {
|
||||
} else if (p->type == IS_CONSTANT_ARRAY) {
|
||||
SEPARATE_ZVAL(pp);
|
||||
p = *pp;
|
||||
zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant);
|
||||
p->type = IS_ARRAY;
|
||||
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -329,7 +333,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
||||
for (i=0; i<param_count; i++) {
|
||||
params_array[i] = ¶ms[i];
|
||||
}
|
||||
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1);
|
||||
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
|
||||
if (local_retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
} else {
|
||||
@@ -340,7 +344,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
||||
}
|
||||
|
||||
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation)
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
|
||||
{
|
||||
int i;
|
||||
zval **original_return_value;
|
||||
@@ -353,12 +357,30 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
|
||||
*retval_ptr_ptr = NULL;
|
||||
|
||||
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */
|
||||
zval **tmp_object_ptr, **tmp_real_function_name;
|
||||
|
||||
if (zend_hash_index_find(function_name->value.ht, 0, (void **) &tmp_object_ptr)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (zend_hash_index_find(function_name->value.ht, 1, (void **) &tmp_real_function_name)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
function_name = *tmp_real_function_name;
|
||||
object = *tmp_object_ptr;
|
||||
}
|
||||
|
||||
if (object) {
|
||||
if (object->type != IS_OBJECT) {
|
||||
return FAILURE;
|
||||
}
|
||||
function_table = &object->value.obj.ce->function_table;
|
||||
}
|
||||
|
||||
if (function_name->type!=IS_STRING) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
original_function_state_ptr = EG(function_state_ptr);
|
||||
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
|
||||
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
|
||||
@@ -403,8 +425,12 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
|
||||
if (function_state.function->type == ZEND_USER_FUNCTION) {
|
||||
calling_symbol_table = EG(active_symbol_table);
|
||||
ALLOC_HASHTABLE(EG(active_symbol_table));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
if (symbol_table) {
|
||||
EG(active_symbol_table) = symbol_table;
|
||||
} else {
|
||||
ALLOC_HASHTABLE(EG(active_symbol_table));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
}
|
||||
if (object) {
|
||||
zval *dummy, **this_ptr;
|
||||
|
||||
@@ -420,8 +446,10 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
EG(active_op_array) = (zend_op_array *) function_state.function;
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
zend_execute(EG(active_op_array) ELS_CC);
|
||||
zend_hash_destroy(EG(active_symbol_table));
|
||||
FREE_HASHTABLE(EG(active_symbol_table));
|
||||
if (!symbol_table) {
|
||||
zend_hash_destroy(EG(active_symbol_table));
|
||||
FREE_HASHTABLE(EG(active_symbol_table));
|
||||
}
|
||||
EG(active_symbol_table) = calling_symbol_table;
|
||||
EG(active_op_array) = original_op_array;
|
||||
EG(return_value_ptr_ptr)=original_return_value;
|
||||
@@ -505,57 +533,6 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
|
||||
{
|
||||
zval *variable_ptr = *variable_ptr_ptr;
|
||||
zval *value_ptr;
|
||||
|
||||
|
||||
if (!value_ptr_ptr) {
|
||||
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
|
||||
return;
|
||||
}
|
||||
|
||||
value_ptr = *value_ptr_ptr;
|
||||
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
|
||||
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
|
||||
} else if (variable_ptr_ptr != value_ptr_ptr) {
|
||||
variable_ptr->refcount--;
|
||||
if (variable_ptr->refcount==0) {
|
||||
zendi_zval_dtor(*variable_ptr);
|
||||
FREE_ZVAL(variable_ptr);
|
||||
}
|
||||
|
||||
if (!PZVAL_IS_REF(value_ptr)) {
|
||||
/* break it away */
|
||||
value_ptr->refcount--;
|
||||
if (value_ptr->refcount>0) {
|
||||
ALLOC_ZVAL(*value_ptr_ptr);
|
||||
**value_ptr_ptr = *value_ptr;
|
||||
value_ptr = *value_ptr_ptr;
|
||||
zendi_zval_copy_ctor(*value_ptr);
|
||||
}
|
||||
value_ptr->refcount = 1;
|
||||
value_ptr->is_ref = 1;
|
||||
}
|
||||
|
||||
*variable_ptr_ptr = value_ptr;
|
||||
value_ptr->refcount++;
|
||||
} else {
|
||||
if (variable_ptr->refcount>1) { /* we need to break away */
|
||||
SEPARATE_ZVAL(variable_ptr_ptr);
|
||||
}
|
||||
(*variable_ptr_ptr)->is_ref = 1;
|
||||
}
|
||||
|
||||
if (result && (result->op_type != IS_UNUSED)) {
|
||||
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
|
||||
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
|
||||
AI_USE_PTR(Ts[result->u.var].var);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if SUPPORT_INTERACTIVE
|
||||
void execute_new_code(CLS_D)
|
||||
@@ -577,32 +554,163 @@ void execute_new_code(CLS_D)
|
||||
#endif
|
||||
|
||||
|
||||
/* these are a dedicated, optimized, function, and shouldn't be used for any purpose
|
||||
* other than by Zend's executor
|
||||
*/
|
||||
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
ZEND_API void zend_timeout(int dummy)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int delete_count = (ulong) *p;
|
||||
ELS_FETCH();
|
||||
|
||||
EG(argument_stack).top -= (delete_count+2);
|
||||
while (--delete_count>=0) {
|
||||
zval_ptr_dtor((zval **) --p);
|
||||
/* is there any point in this? we're terminating the request anyway...
|
||||
PLS_FETCH();
|
||||
|
||||
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
|
||||
*/
|
||||
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
|
||||
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
case WM_REGISTER_ZEND_TIMEOUT:
|
||||
/* wParam is the thread id pointer, lParam is the timeout amount in seconds */
|
||||
if (lParam==0) {
|
||||
KillTimer(timeout_window, wParam);
|
||||
} else {
|
||||
SetTimer(timeout_window, wParam, lParam*1000, NULL);
|
||||
}
|
||||
break;
|
||||
case WM_UNREGISTER_ZEND_TIMEOUT:
|
||||
/* wParam is the thread id pointer */
|
||||
KillTimer(timeout_window, wParam);
|
||||
break;
|
||||
case WM_TIMER: {
|
||||
#ifdef ZTS
|
||||
zend_executor_globals *executor_globals;
|
||||
|
||||
executor_globals = ts_resource_ex(executor_globals_id, &wParam);
|
||||
if (!executor_globals) {
|
||||
/* Thread died before receiving its timeout? */
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
KillTimer(timeout_window, wParam);
|
||||
EG(timed_out) = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd,message,wParam,lParam);
|
||||
}
|
||||
EG(argument_stack).top_element = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
|
||||
static unsigned __stdcall timeout_thread_proc(void *pArgs)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int arg_count = (ulong) *p;
|
||||
MSG message;
|
||||
|
||||
if (requested_arg>arg_count) {
|
||||
return FAILURE;
|
||||
wc.style=0;
|
||||
wc.lpfnWndProc = zend_timeout_WndProc;
|
||||
wc.cbClsExtra=0;
|
||||
wc.cbWndExtra=0;
|
||||
wc.hInstance=NULL;
|
||||
wc.hIcon=NULL;
|
||||
wc.hCursor=NULL;
|
||||
wc.hbrBackground=(HBRUSH)(COLOR_BACKGROUND + 5);
|
||||
wc.lpszMenuName=NULL;
|
||||
wc.lpszClassName = "Zend Timeout Window";
|
||||
if(!RegisterClass(&wc)) {
|
||||
return -1;
|
||||
}
|
||||
*data = (p-arg_count+requested_arg-1);
|
||||
return SUCCESS;
|
||||
timeout_window = CreateWindow(wc.lpszClassName, wc.lpszClassName, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
|
||||
SetEvent(timeout_thread_event);
|
||||
while (GetMessage(&message, NULL, 0, 0)) {
|
||||
SendMessage(timeout_window, message.message, message.wParam, message.lParam);
|
||||
if (message.message == WM_QUIT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
DestroyWindow(timeout_window);
|
||||
UnregisterClass(wc.lpszClassName, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void zend_init_timeout_thread()
|
||||
{
|
||||
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
|
||||
WaitForSingleObject(timeout_thread_event, INFINITE);
|
||||
}
|
||||
|
||||
|
||||
void zend_shutdown_timeout_thread()
|
||||
{
|
||||
if (!timeout_thread_initialized) {
|
||||
return;
|
||||
}
|
||||
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* This one doesn't exists on QNX */
|
||||
#ifndef SIGPROF
|
||||
#define SIGPROF 27
|
||||
#endif
|
||||
|
||||
void zend_set_timeout(long seconds)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
EG(timeout_seconds) = seconds;
|
||||
#ifdef ZEND_WIN32
|
||||
if (timeout_thread_initialized==0 && InterlockedIncrement(&timeout_thread_initialized)==1) {
|
||||
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
|
||||
* is initialized inside a DllMain(), you're not supposed to start threads from it.
|
||||
*/
|
||||
zend_init_timeout_thread();
|
||||
}
|
||||
PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
|
||||
#else
|
||||
# ifdef HAVE_SETITIMER
|
||||
{
|
||||
struct itimerval t_r; /* timeout requested */
|
||||
sigset_t sigset;
|
||||
|
||||
t_r.it_value.tv_sec = seconds;
|
||||
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
|
||||
|
||||
setitimer(ITIMER_PROF, &t_r, NULL);
|
||||
signal(SIGPROF, zend_timeout);
|
||||
sigemptyset(&sigset);
|
||||
sigaddset(&sigset, SIGPROF);
|
||||
sigprocmask(SIG_UNBLOCK,&sigset,NULL);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void zend_unset_timeout(void)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) 0);
|
||||
#else
|
||||
# ifdef HAVE_SETITIMER
|
||||
{
|
||||
struct itimerval no_timeout;
|
||||
|
||||
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
|
||||
|
||||
setitimer(ITIMER_PROF, &no_timeout, NULL);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _ZEND_EXECUTE_LOCKS_H
|
||||
#define _ZEND_EXECUTE_LOCKS_H
|
||||
#ifndef ZEND_EXECUTE_LOCKS_H
|
||||
#define ZEND_EXECUTE_LOCKS_H
|
||||
|
||||
#define PZVAL_LOCK(z) ((z)->refcount++)
|
||||
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
|
||||
@@ -19,4 +19,4 @@
|
||||
|
||||
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
|
||||
|
||||
#endif /* _ZEND_EXECUTE_LOCKS_H */
|
||||
#endif /* ZEND_EXECUTE_LOCKS_H */
|
||||
@@ -65,18 +65,19 @@ int zend_load_extension(char *path)
|
||||
}
|
||||
|
||||
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
|
||||
fprintf(stderr, "%s requires Zend version %s or later\n"
|
||||
"Current version %s, API version %d\n",
|
||||
fprintf(stderr, "%s requires Zend Engine API version %d\n"
|
||||
"The installed Zend Engine API version is %d\n\n",
|
||||
new_extension->name,
|
||||
extension_version_info->required_zend_version,
|
||||
ZEND_VERSION,
|
||||
extension_version_info->zend_extension_api_no,
|
||||
ZEND_EXTENSION_API_NO);
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
|
||||
/* we may be able to allow for downwards compatability in some harmless cases. */
|
||||
fprintf(stderr, "%s is outdated (API version %d, current version %d)\n"
|
||||
"Contact %s at %s for a later version of this module.\n",
|
||||
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
|
||||
"It requires a more recent version of the Zend Engine\n"
|
||||
"The installed Zend Engine API version is %d\n"
|
||||
"Contact %s at %s for a later version of this module.\n\n",
|
||||
new_extension->name,
|
||||
extension_version_info->zend_extension_api_no,
|
||||
ZEND_EXTENSION_API_NO,
|
||||
|
||||
+5
-11
@@ -18,12 +18,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_EXTENSIONS_H
|
||||
#define _ZEND_EXTENSIONS_H
|
||||
#ifndef ZEND_EXTENSIONS_H
|
||||
#define ZEND_EXTENSIONS_H
|
||||
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define ZEND_EXTENSION_API_NO 20000428
|
||||
#define ZEND_EXTENSION_API_NO 20000707
|
||||
|
||||
typedef struct _zend_extension_version_info {
|
||||
int zend_extension_api_no;
|
||||
@@ -77,15 +77,9 @@ ZEND_API void zend_extension_dispatch_message(int message, void *arg);
|
||||
|
||||
#define ZEND_EXTMSG_NEW_EXTENSION 1
|
||||
|
||||
#ifdef ZTS
|
||||
#define ZTS_V 1
|
||||
#else
|
||||
#define ZTS_V 0
|
||||
#endif
|
||||
|
||||
|
||||
#define ZEND_EXTENSION() \
|
||||
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG }
|
||||
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
|
||||
|
||||
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
|
||||
|
||||
@@ -100,4 +94,4 @@ void zend_append_version_info(zend_extension *extension);
|
||||
int zend_startup_extensions(void);
|
||||
void zend_shutdown_extensions(void);
|
||||
|
||||
#endif /* _ZEND_EXTENSIONS_H */
|
||||
#endif /* ZEND_EXTENSIONS_H */
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_FAST_CACHE_H
|
||||
#define _ZEND_FAST_CACHE_H
|
||||
#ifndef ZEND_FAST_CACHE_H
|
||||
#define ZEND_FAST_CACHE_H
|
||||
|
||||
#ifndef ZEND_ENABLE_FAST_CACHE
|
||||
# if ZEND_DEBUG
|
||||
@@ -130,7 +130,7 @@ typedef struct _zend_fast_cache_list_entry {
|
||||
#define FREE_HASHTABLE_REL(ht) \
|
||||
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
|
||||
|
||||
#endif /* _ZEND_FAST_CACHE_H */
|
||||
#endif /* ZEND_FAST_CACHE_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
/*
|
||||
* If C9X_INLINE_SEMANTICS is already defined here,
|
||||
* we assume the user does not want GCC inline semantics,
|
||||
* but compiles this file always.
|
||||
*/
|
||||
|
||||
#ifndef C9X_INLINE_SEMANTICS
|
||||
|
||||
#define C9X_INLINE_SEMANTICS
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#include "zend_execute.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
#endif
|
||||
+15
-6
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _T_GLOBALS_H
|
||||
#define _T_GLOBALS_H
|
||||
#ifndef ZEND_GLOBALS_H
|
||||
#define ZEND_GLOBALS_H
|
||||
|
||||
|
||||
#include <setjmp.h>
|
||||
@@ -54,7 +54,6 @@ END_EXTERN_C()
|
||||
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend_execute.h"
|
||||
|
||||
/* excpt.h on Digital Unix 4.0 defines function_table */
|
||||
#undef function_table
|
||||
@@ -151,6 +150,7 @@ struct _zend_executor_globals {
|
||||
jmp_buf bailout;
|
||||
|
||||
int error_reporting;
|
||||
int orig_error_reporting;
|
||||
|
||||
zend_op_array *active_op_array;
|
||||
zend_op_array *main_op_array;
|
||||
@@ -168,6 +168,10 @@ struct _zend_executor_globals {
|
||||
/* for extended information support */
|
||||
zend_bool no_extensions;
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
zend_bool timed_out;
|
||||
#endif
|
||||
|
||||
HashTable regular_list;
|
||||
HashTable persistent_list;
|
||||
|
||||
@@ -180,6 +184,12 @@ struct _zend_executor_globals {
|
||||
int garbage_ptr;
|
||||
|
||||
zval *user_error_handler;
|
||||
zend_ptr_stack user_error_handlers;
|
||||
|
||||
/* timeout support */
|
||||
int timeout_seconds;
|
||||
|
||||
int lambda_count;
|
||||
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
#if SUPPORT_INTERACTIVE
|
||||
@@ -192,7 +202,7 @@ struct _zend_alloc_globals {
|
||||
zend_mem_header *head; /* standard list */
|
||||
zend_mem_header *phead; /* persistent list */
|
||||
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
|
||||
unsigned char cache_count[MAX_CACHED_MEMORY];
|
||||
unsigned int cache_count[MAX_CACHED_MEMORY];
|
||||
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
|
||||
|
||||
#if ZEND_DEBUG
|
||||
@@ -207,5 +217,4 @@ struct _zend_alloc_globals {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif /* _T_GLOBALS_H */
|
||||
#endif /* ZEND_GLOBALS_H */
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_GLOBALS_MACROS_H
|
||||
#define _ZEND_GLOBALS_MACROS_H
|
||||
#ifndef ZEND_GLOBALS_MACROS_H
|
||||
#define ZEND_GLOBALS_MACROS_H
|
||||
|
||||
typedef struct _zend_compiler_globals zend_compiler_globals;
|
||||
typedef struct _zend_executor_globals zend_executor_globals;
|
||||
@@ -85,5 +85,5 @@ extern ZEND_API zend_executor_globals executor_globals;
|
||||
extern ZEND_API zend_alloc_globals alloc_globals;
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_GLOBALS_MACROS_H */
|
||||
#endif /* ZEND_GLOBALS_MACROS_H */
|
||||
|
||||
+125
-18
@@ -78,24 +78,28 @@
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
#define HT_OK 0
|
||||
#define HT_IS_DESTROYING 1
|
||||
#define HT_DESTROYED 2
|
||||
#define HT_CLEANING 3
|
||||
#define HT_OK 0
|
||||
#define HT_CLEANING 3
|
||||
|
||||
static void _zend_is_inconsistent(HashTable *ht, char *file, int line)
|
||||
{
|
||||
if (ht->inconsistent==HT_OK) {
|
||||
return;
|
||||
}
|
||||
switch (ht->inconsistent) {
|
||||
case HT_IS_DESTROYING:
|
||||
zend_error(E_CORE_ERROR, "ht=%08x is destroying in %s:%d", ht, file, line);
|
||||
break;
|
||||
case HT_DESTROYED:
|
||||
zend_error(E_CORE_ERROR, "ht=%08x is already destroyed in %s:%d", ht, file, line);
|
||||
break;
|
||||
case HT_CLEANING:
|
||||
zend_error(E_CORE_ERROR, "ht=%08x is cleaning %s:%d", ht, file, line);
|
||||
break;
|
||||
case HT_IS_DESTROYING:
|
||||
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is being destroyed", file, line, ht);
|
||||
break;
|
||||
case HT_DESTROYED:
|
||||
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is already destroyed", file, line, ht);
|
||||
break;
|
||||
case HT_CLEANING:
|
||||
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is being cleaned", file, line, ht);
|
||||
break;
|
||||
}
|
||||
zend_bailout();
|
||||
}
|
||||
#define IS_CONSISTENT(a) _zend_is_inconsistent(a,__FILE__,__LINE__);
|
||||
#define SET_INCONSISTENT(n) ht->inconsistent = n;
|
||||
@@ -104,9 +108,23 @@ static void _zend_is_inconsistent(HashTable *ht, char *file, int line)
|
||||
#define SET_INCONSISTENT(n)
|
||||
#endif
|
||||
|
||||
#define HASH_APPLY_BEGIN(ht) \
|
||||
if ((ht)->bApplyProtection) { \
|
||||
if ((ht)->nApplyCount>=3) { \
|
||||
zend_error(E_WARNING, "Nesting level too deep - recursive dependency?"); \
|
||||
return; \
|
||||
} \
|
||||
(ht)->nApplyCount++; \
|
||||
}
|
||||
|
||||
#define HASH_APPLY_END(ht) \
|
||||
(ht)->nApplyCount--;
|
||||
|
||||
|
||||
/* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */
|
||||
static uint PrimeNumbers[] =
|
||||
{5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793, 2097397, 4194103, 8388857, 16777447, 33554201, 67108961, 134217487, 268435697, 536870683, 1073741621, 2147483399};
|
||||
{5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793, 2097397, 4194103, 8388857, 16777447, 33554201, 67108961, 134217487, 268435697, 536870683, 1073741621, 2147483399};
|
||||
static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(uint);
|
||||
|
||||
#define ZEND_HASH_IF_FULL_DO_RESIZE(ht) \
|
||||
if ((ht)->nNumOfElements > (ht)->nTableSize) { \
|
||||
@@ -115,7 +133,6 @@ static uint PrimeNumbers[] =
|
||||
|
||||
static int zend_hash_do_resize(HashTable *ht);
|
||||
|
||||
static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(ulong);
|
||||
|
||||
ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
|
||||
{
|
||||
@@ -200,9 +217,28 @@ ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction
|
||||
ht->nNextFreeElement = 0;
|
||||
ht->pInternalPointer = NULL;
|
||||
ht->persistent = persistent;
|
||||
ht->nApplyCount = 0;
|
||||
ht->bApplyProtection = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection)
|
||||
{
|
||||
int retval = zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent);
|
||||
|
||||
ht->bApplyProtection = bApplyProtection;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection)
|
||||
{
|
||||
ht->bApplyProtection = bApplyProtection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag)
|
||||
{
|
||||
ulong h;
|
||||
@@ -650,6 +686,7 @@ ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func)
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
|
||||
HASH_APPLY_BEGIN(ht);
|
||||
p = ht->pListHead;
|
||||
while (p != NULL) {
|
||||
if (apply_func(p->pData)) {
|
||||
@@ -658,6 +695,7 @@ ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func)
|
||||
p = p->pListNext;
|
||||
}
|
||||
}
|
||||
HASH_APPLY_END(ht);
|
||||
}
|
||||
|
||||
|
||||
@@ -667,6 +705,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
|
||||
HASH_APPLY_BEGIN(ht);
|
||||
p = ht->pListHead;
|
||||
while (p != NULL) {
|
||||
if (apply_func(p->pData, argument)) {
|
||||
@@ -675,6 +714,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
|
||||
p = p->pListNext;
|
||||
}
|
||||
}
|
||||
HASH_APPLY_END(ht);
|
||||
}
|
||||
|
||||
|
||||
@@ -686,8 +726,9 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
|
||||
va_start(args, num_args);
|
||||
HASH_APPLY_BEGIN(ht);
|
||||
|
||||
va_start(args, num_args);
|
||||
p = ht->pListHead;
|
||||
while (p != NULL) {
|
||||
hash_key.arKey = p->arKey;
|
||||
@@ -699,8 +740,9 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
|
||||
p = p->pListNext;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
HASH_APPLY_END(ht);
|
||||
}
|
||||
|
||||
|
||||
@@ -1064,6 +1106,71 @@ ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered)
|
||||
{
|
||||
Bucket *p1, *p2;
|
||||
int result;
|
||||
void *pData2;
|
||||
|
||||
IS_CONSISTENT(ht1);
|
||||
IS_CONSISTENT(ht2);
|
||||
|
||||
result = ht1->nNumOfElements - ht2->nNumOfElements;
|
||||
if (result!=0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
p1 = ht1->pListHead;
|
||||
if (ordered) {
|
||||
p2 = ht2->pListHead;
|
||||
}
|
||||
|
||||
while (p1) {
|
||||
if (ordered && !p2) {
|
||||
return 1; /* That's not supposed to happen */
|
||||
}
|
||||
if (ordered) {
|
||||
if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
|
||||
result = p1->h - p2->h;
|
||||
if (result!=0) {
|
||||
return result;
|
||||
}
|
||||
} else { /* string indices */
|
||||
result = p1->nKeyLength - p2->nKeyLength;
|
||||
if (result!=0) {
|
||||
return result;
|
||||
}
|
||||
result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength);
|
||||
if (result!=0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
pData2 = p2->pData;
|
||||
} else {
|
||||
if (p1->nKeyLength==0) { /* numeric index */
|
||||
if (zend_hash_index_find(ht2, p1->h, &pData2)==FAILURE) {
|
||||
return 1;
|
||||
}
|
||||
} else { /* string index */
|
||||
if (zend_hash_find(ht2, p1->arKey, p1->nKeyLength, &pData2)==FAILURE) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
result = compar(p1->pData, pData2);
|
||||
if (result!=0) {
|
||||
return result;
|
||||
}
|
||||
p1 = p1->pListNext;
|
||||
if (ordered) {
|
||||
p2 = p2->pListNext;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar) (const void *, const void *), int flag, void **pData)
|
||||
{
|
||||
Bucket *p,*res;
|
||||
@@ -1106,7 +1213,7 @@ void zend_hash_display_pListTail(HashTable *ht)
|
||||
|
||||
p = ht->pListTail;
|
||||
while (p != NULL) {
|
||||
zend_printf("pListTail has key %s\n", p->arKey);
|
||||
zend_output_debug_string(0, "pListTail has key %s\n", p->arKey);
|
||||
p = p->pListLast;
|
||||
}
|
||||
}
|
||||
@@ -1119,14 +1226,14 @@ void zend_hash_display(HashTable *ht)
|
||||
for (i = 0; i < ht->nTableSize; i++) {
|
||||
p = ht->arBuckets[i];
|
||||
while (p != NULL) {
|
||||
zend_printf("%s <==> 0x%X\n", p->arKey, p->h);
|
||||
zend_output_debug_string(0, "%s <==> 0x%X\n", p->arKey, p->h);
|
||||
p = p->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
p = ht->pListTail;
|
||||
while (p != NULL) {
|
||||
zend_printf("%s <==> 0x%X\n", p->arKey, p->h);
|
||||
zend_output_debug_string(0, "%s <==> 0x%X\n", p->arKey, p->h);
|
||||
p = p->pListLast;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-6
@@ -17,8 +17,8 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef _HASH_
|
||||
#define _HASH_
|
||||
#ifndef ZEND_HASH_H
|
||||
#define ZEND_HASH_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -41,7 +41,7 @@ typedef int (*apply_func_arg_t)(void *pDest, void *argument);
|
||||
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
|
||||
typedef void (*copy_ctor_func_t)(void *pElement);
|
||||
|
||||
struct hashtable;
|
||||
struct _hashtable;
|
||||
|
||||
typedef struct bucket {
|
||||
ulong h; /* Used for numeric indexing */
|
||||
@@ -55,7 +55,7 @@ typedef struct bucket {
|
||||
char arKey[1]; /* Must be last element */
|
||||
} Bucket;
|
||||
|
||||
typedef struct hashtable {
|
||||
typedef struct _hashtable {
|
||||
uint nTableSize;
|
||||
uint nHashSizeIndex;
|
||||
uint nNumOfElements;
|
||||
@@ -66,7 +66,9 @@ typedef struct hashtable {
|
||||
Bucket *pListTail;
|
||||
Bucket **arBuckets;
|
||||
dtor_func_t pDestructor;
|
||||
unsigned char persistent;
|
||||
zend_bool persistent;
|
||||
unsigned char nApplyCount;
|
||||
zend_bool bApplyProtection;
|
||||
#if ZEND_DEBUG
|
||||
int inconsistent;
|
||||
#endif
|
||||
@@ -78,6 +80,7 @@ BEGIN_EXTERN_C()
|
||||
|
||||
/* startup/shutdown */
|
||||
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent);
|
||||
ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection);
|
||||
ZEND_API void zend_hash_destroy(HashTable *ht);
|
||||
|
||||
ZEND_API void zend_hash_clean(HashTable *ht);
|
||||
@@ -108,6 +111,8 @@ typedef struct _zend_hash_key {
|
||||
} zend_hash_key;
|
||||
|
||||
|
||||
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
|
||||
|
||||
#define ZEND_STD_HASH_APPLIER \
|
||||
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
|
||||
|
||||
@@ -166,6 +171,7 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
|
||||
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
|
||||
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
|
||||
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
|
||||
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
|
||||
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
|
||||
|
||||
ZEND_API int zend_hash_num_elements(HashTable *ht);
|
||||
@@ -189,4 +195,4 @@ END_EXTERN_C()
|
||||
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
|
||||
|
||||
|
||||
#endif /* _HASH_ */
|
||||
#endif /* ZEND_HASH_H */
|
||||
@@ -33,7 +33,7 @@ extern int zendleng;
|
||||
#define zendleng zend_get_zendleng(CLS_C)
|
||||
#endif
|
||||
|
||||
static void html_putc(char c)
|
||||
ZEND_API void zend_html_putc(char c)
|
||||
{
|
||||
switch (c) {
|
||||
case '\n':
|
||||
@@ -61,12 +61,12 @@ static void html_putc(char c)
|
||||
}
|
||||
|
||||
|
||||
static void html_puts(char *s, uint len)
|
||||
ZEND_API void zend_html_puts(char *s, uint len)
|
||||
{
|
||||
register char *ptr=s, *end=s+len;
|
||||
|
||||
while (ptr<end) {
|
||||
html_putc(*ptr++);
|
||||
zend_html_putc(*ptr++);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
in_string = !in_string;
|
||||
break;
|
||||
case T_WHITESPACE:
|
||||
html_puts(zendtext, zendleng); /* no color needed */
|
||||
zend_html_puts(zendtext, zendleng); /* no color needed */
|
||||
token.type = 0;
|
||||
continue;
|
||||
break;
|
||||
@@ -136,10 +136,10 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
}
|
||||
switch (token_type) {
|
||||
case T_END_HEREDOC:
|
||||
html_puts(token.value.str.val, token.value.str.len);
|
||||
zend_html_puts(token.value.str.val, token.value.str.len);
|
||||
break;
|
||||
default:
|
||||
html_puts(zendtext, zendleng);
|
||||
zend_html_puts(zendtext, zendleng);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _HIGHLIGHT_H
|
||||
#define _HIGHLIGHT_H
|
||||
#ifndef ZEND_HIGHLIGHT_H
|
||||
#define ZEND_HIGHLIGHT_H
|
||||
|
||||
#define HL_COMMENT_COLOR "#FF8000" /* orange */
|
||||
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
|
||||
@@ -42,6 +42,8 @@ BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
ZEND_API void zend_html_putc(char c);
|
||||
ZEND_API void zend_html_puts(char *s, uint len);
|
||||
END_EXTERN_C()
|
||||
|
||||
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_INDENT_H
|
||||
#define _ZEND_INDENT_H
|
||||
#ifndef ZEND_INDENT_H
|
||||
#define ZEND_INDENT_H
|
||||
|
||||
ZEND_API void zend_indent(void);
|
||||
|
||||
#endif /* _ZEND_INDENT_H */
|
||||
#endif /* ZEND_INDENT_H */
|
||||
+20
-4
@@ -215,8 +215,9 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
|
||||
|
||||
resource = zend_list_find(id, &actual_resource_type);
|
||||
if (!resource) {
|
||||
if (resource_type_name)
|
||||
if (resource_type_name) {
|
||||
zend_error(E_WARNING, "%d is not a valid %s resource", id, resource_type_name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -232,8 +233,9 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
|
||||
}
|
||||
va_end(resource_types);
|
||||
|
||||
if (resource_type_name)
|
||||
if (resource_type_name) {
|
||||
zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -287,7 +289,7 @@ int zend_init_rsrc_list(ELS_D)
|
||||
|
||||
int zend_init_rsrc_plist(ELS_D)
|
||||
{
|
||||
return zend_hash_init(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1);
|
||||
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -347,6 +349,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void
|
||||
lde.module_number = module_number;
|
||||
lde.resource_id = list_destructors.nNextFreeElement;
|
||||
lde.type = ZEND_RESOURCE_LIST_TYPE_STD;
|
||||
lde.type_name = NULL;
|
||||
|
||||
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
|
||||
return FAILURE;
|
||||
@@ -355,7 +358,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, int module_number)
|
||||
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
|
||||
{
|
||||
zend_rsrc_list_dtors_entry lde;
|
||||
|
||||
@@ -370,6 +373,7 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
|
||||
lde.module_number = module_number;
|
||||
lde.resource_id = list_destructors.nNextFreeElement;
|
||||
lde.type = ZEND_RESOURCE_LIST_TYPE_EX;
|
||||
lde.type_name = type_name;
|
||||
|
||||
if (zend_hash_next_index_insert(&list_destructors,(void *) &lde, sizeof(zend_rsrc_list_dtors_entry),NULL)==FAILURE) {
|
||||
return FAILURE;
|
||||
@@ -390,6 +394,18 @@ void zend_destroy_rsrc_list_dtors()
|
||||
}
|
||||
|
||||
|
||||
char *zend_rsrc_list_get_rsrc_type(int resource)
|
||||
{
|
||||
zend_rsrc_list_dtors_entry *lde;
|
||||
|
||||
if (zend_hash_index_find(&list_destructors, resource, (void **) &lde)==SUCCESS) {
|
||||
return lde->type_name;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
|
||||
+10
-5
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LIST_H
|
||||
#define _LIST_H
|
||||
#ifndef ZEND_LIST_H
|
||||
#define ZEND_LIST_H
|
||||
|
||||
#include "zend_hash.h"
|
||||
#include "zend_globals.h"
|
||||
@@ -35,7 +35,8 @@ typedef struct _zend_rsrc_list_entry {
|
||||
zend_bool valid;
|
||||
} zend_rsrc_list_entry;
|
||||
|
||||
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *le);
|
||||
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc);
|
||||
#define ZEND_RSRC_DTOR_FUNC(name) void name(zend_rsrc_list_entry *rsrc)
|
||||
|
||||
typedef struct _zend_rsrc_list_dtors_entry {
|
||||
/* old style destructors */
|
||||
@@ -46,6 +47,8 @@ typedef struct _zend_rsrc_list_dtors_entry {
|
||||
rsrc_dtor_func_t list_dtor_ex;
|
||||
rsrc_dtor_func_t plist_dtor_ex;
|
||||
|
||||
char *type_name;
|
||||
|
||||
int module_number;
|
||||
int resource_id;
|
||||
unsigned char type;
|
||||
@@ -54,7 +57,7 @@ typedef struct _zend_rsrc_list_dtors_entry {
|
||||
|
||||
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
|
||||
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
|
||||
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, int module_number);
|
||||
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);
|
||||
|
||||
enum list_entry_type {
|
||||
LE_DB=1000
|
||||
@@ -83,11 +86,13 @@ ZEND_API void *zend_plist_find(int id, int *type);
|
||||
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
|
||||
|
||||
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
|
||||
|
||||
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
|
||||
|
||||
#define ZEND_VERIFY_RESOURCE(rsrc) \
|
||||
if (!rsrc) { \
|
||||
RETURN_FALSE; \
|
||||
RETURN_NULL(); \
|
||||
}
|
||||
|
||||
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
|
||||
|
||||
+6
-5
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_LLIST_H
|
||||
#define _ZEND_LLIST_H
|
||||
#ifndef ZEND_LLIST_H
|
||||
#define ZEND_LLIST_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef struct _zend_llist {
|
||||
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
|
||||
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
|
||||
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
|
||||
typedef void (*llist_apply_func_t)(void *);
|
||||
|
||||
typedef zend_llist_element* zend_llist_position;
|
||||
|
||||
@@ -53,8 +54,8 @@ ZEND_API void zend_llist_destroy(zend_llist *l);
|
||||
ZEND_API void zend_llist_clean(zend_llist *l);
|
||||
ZEND_API void zend_llist_remove_tail(zend_llist *l);
|
||||
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
|
||||
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data));
|
||||
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg);
|
||||
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
|
||||
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
|
||||
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
|
||||
ZEND_API int zend_llist_count(zend_llist *l);
|
||||
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func);
|
||||
@@ -72,4 +73,4 @@ ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _ZEND_LLIST_H */
|
||||
#endif /* ZEND_LLIST_H */
|
||||
+3
-4
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
#ifndef MODULES_H
|
||||
#define MODULES_H
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
|
||||
@@ -37,8 +37,7 @@ extern unsigned char second_arg_allow_ref[];
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#define ZEND_MODULE_API_NO 20000401
|
||||
|
||||
#define ZEND_MODULE_API_NO 20000609
|
||||
#ifdef ZTS
|
||||
#define USING_ZTS 1
|
||||
#else
|
||||
|
||||
+1
-1
@@ -186,13 +186,13 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
|
||||
|
||||
void init_op(zend_op *op CLS_DC)
|
||||
{
|
||||
memset(&op->result, 0, sizeof(znode));
|
||||
op->lineno = CG(zend_lineno);
|
||||
op->filename = zend_get_compiled_filename(CLS_C);
|
||||
op->result.op_type = IS_UNUSED;
|
||||
op->extended_value = 0;
|
||||
memset(&op->op1, 0, sizeof(znode));
|
||||
memset(&op->op2, 0, sizeof(znode));
|
||||
memset(&op->result, 0, sizeof(znode));
|
||||
}
|
||||
|
||||
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
|
||||
|
||||
+250
-86
@@ -32,20 +32,55 @@
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
|
||||
#ifndef HAVE_FINITE
|
||||
#ifndef finite /* in case it's already a macro */
|
||||
#define finite(a) isfinite(a) /* HPUX 11 only has isfinite() */
|
||||
#endif
|
||||
#else
|
||||
#if HAVE_IEEEFP_H
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if WITH_BCMATH
|
||||
#include "ext/bcmath/number.h"
|
||||
#endif
|
||||
|
||||
ZEND_API double zend_string_to_double(const char *number, zend_uint length)
|
||||
{
|
||||
double divisor = 10.0;
|
||||
double result = 0.0;
|
||||
double exponent;
|
||||
const char *end = number+length;
|
||||
const char *digit = number;
|
||||
|
||||
if (!length) {
|
||||
return result;
|
||||
}
|
||||
|
||||
while (digit < end) {
|
||||
if ((*digit <= '9' && *digit >= '0')) {
|
||||
result *= 10;
|
||||
result += *digit - '0';
|
||||
} else if (*digit == '.') {
|
||||
digit++;
|
||||
break;
|
||||
} else if (toupper(*digit) == 'E') {
|
||||
exponent = (double) atoi(digit+1);
|
||||
result *= pow(10.0, exponent);
|
||||
return result;
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
digit++;
|
||||
}
|
||||
|
||||
while (digit < end) {
|
||||
if ((*digit <= '9' && *digit >= '0')) {
|
||||
result += (*digit - '0') / divisor;
|
||||
divisor *= 10;
|
||||
} else if (toupper(*digit) == 'E') {
|
||||
exponent = (double) atoi(digit+1);
|
||||
result *= pow(10.0, exponent);
|
||||
return result;
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
digit++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void convert_scalar_to_number(zval *op)
|
||||
{
|
||||
@@ -344,6 +379,12 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
|
||||
op->value.str.len = 0;
|
||||
}
|
||||
break;
|
||||
case IS_RESOURCE: {
|
||||
long tmp = op->value.lval;
|
||||
op->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
|
||||
op->value.str.len = sprintf(op->value.str.val, "Resource id #%ld", tmp);
|
||||
break;
|
||||
}
|
||||
case IS_LONG:
|
||||
lval = op->value.lval;
|
||||
|
||||
@@ -880,7 +921,7 @@ ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
result->value.str.len = op1->value.str.len + 1;
|
||||
result->value.str.val = (char *) erealloc(op1->value.str.val, result->value.str.len+1);
|
||||
result->value.str.val[result->value.str.len - 1] = op2->value.chval;
|
||||
result->value.str.val[result->value.str.len - 1] = (char) op2->value.lval;
|
||||
result->value.str.val[result->value.str.len] = 0;
|
||||
result->type = IS_STRING;
|
||||
return SUCCESS;
|
||||
@@ -945,10 +986,70 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
int use_copy1, use_copy2;
|
||||
|
||||
zend_make_printable_zval(op1, &op1_copy, &use_copy1);
|
||||
zend_make_printable_zval(op2, &op2_copy, &use_copy2);
|
||||
|
||||
if (use_copy1) {
|
||||
op1 = &op1_copy;
|
||||
}
|
||||
if (use_copy2) {
|
||||
op2 = &op2_copy;
|
||||
}
|
||||
|
||||
result->value.lval = zend_binary_zval_strcmp(op1, op2);
|
||||
result->type = IS_LONG;
|
||||
|
||||
if (use_copy1) {
|
||||
zval_dtor(op1);
|
||||
}
|
||||
if (use_copy2) {
|
||||
zval_dtor(op2);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
op1_copy = *op1;
|
||||
zval_copy_ctor(&op1_copy);
|
||||
|
||||
op2_copy = *op2;
|
||||
zval_copy_ctor(&op2_copy);
|
||||
|
||||
convert_to_double(&op1_copy);
|
||||
convert_to_double(&op2_copy);
|
||||
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(op1_copy.value.dval-op2_copy.value.dval);
|
||||
result->type = IS_LONG;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
if ((op1->type == IS_NULL && op2->type == IS_STRING)
|
||||
|| (op2->type == IS_NULL && op1->type == IS_STRING)) {
|
||||
if (op1->type == IS_NULL) {
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = zend_binary_strcmp("", 0, op2->value.str.val, op2->value.str.len);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = zend_binary_strcmp(op1->value.str.val, op1->value.str.len, "", 0);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
if (op1->type == IS_STRING && op2->type == IS_STRING) {
|
||||
zendi_smart_strcmp(result, op1, op2);
|
||||
return SUCCESS;
|
||||
@@ -959,7 +1060,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval - op2->value.lval;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -968,24 +1069,68 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval - op2->value.lval;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
|
||||
return SUCCESS;
|
||||
}
|
||||
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
|
||||
&& (op2->type == IS_DOUBLE || op2->type == IS_LONG)) {
|
||||
result->value.dval = (op1->type == IS_LONG ? (double) op1->value.lval : op1->value.dval) - (op2->type == IS_LONG ? (double) op2->value.lval : op2->value.dval);
|
||||
result->type = IS_DOUBLE;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.dval);
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
}
|
||||
if ((op1->type==IS_ARRAY || op1->type==IS_OBJECT)
|
||||
&& (op2->type==IS_ARRAY || op2->type==IS_OBJECT)) {
|
||||
zend_error(E_WARNING,"Cannot compare arrays or objects");
|
||||
if (op1->type==IS_ARRAY && op2->type==IS_ARRAY) {
|
||||
zend_compare_arrays(result, op1, op2);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
if (op1->type==IS_OBJECT && op2->type==IS_OBJECT) {
|
||||
zend_compare_objects(result, op1, op2);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
if (op1->type==IS_ARRAY) {
|
||||
result->value.lval = 1;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
}
|
||||
if (op2->type==IS_ARRAY) {
|
||||
result->value.lval = -1;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
}
|
||||
if (op1->type==IS_OBJECT) {
|
||||
result->value.lval = 1;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
}
|
||||
if (op2->type==IS_OBJECT) {
|
||||
result->value.lval = -1;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
var_reset(result);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
||||
static int hash_zval_identical_function(const zval **z1, const zval **z2)
|
||||
{
|
||||
zval result;
|
||||
|
||||
/* is_identical_function() returns 1 in case of identity and 0 in case
|
||||
* of a difference;
|
||||
* whereas this comparison function is expected to return 0 on identity,
|
||||
* and non zero otherwise.
|
||||
*/
|
||||
if (is_identical_function(&result, (zval *) *z1, (zval *) *z2)==FAILURE) {
|
||||
return 1;
|
||||
}
|
||||
return !result.value.lval;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
result->type = IS_BOOL;
|
||||
@@ -996,17 +1141,14 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
|
||||
switch (op1->type) {
|
||||
case IS_NULL:
|
||||
result->value.lval = (op2->type==IS_NULL);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
case IS_RESOURCE:
|
||||
result->value.lval = (op1->value.lval == op2->value.lval);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
result->value.lval = (op1->value.dval == op2->value.dval);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_STRING:
|
||||
if ((op1->value.str.len == op2->value.str.len)
|
||||
@@ -1015,22 +1157,37 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
|
||||
} else {
|
||||
result->value.lval = 0;
|
||||
}
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
case IS_OBJECT:
|
||||
zend_error(E_WARNING,"Cannot compare arrays or objects");
|
||||
if (zend_hash_compare(op1->value.ht, op2->value.ht, (compare_func_t) hash_zval_identical_function, 1)==0) {
|
||||
result->value.lval = 1;
|
||||
} else {
|
||||
result->value.lval = 0;
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (op1->value.obj.ce != op2->value.obj.ce) {
|
||||
result->value.lval = 0;
|
||||
} else {
|
||||
if (zend_hash_compare(op1->value.obj.properties, op2->value.obj.properties, (compare_func_t) hash_zval_identical_function, 1)==0) {
|
||||
result->value.lval = 1;
|
||||
} else {
|
||||
result->value.lval = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
var_reset(result);
|
||||
return FAILURE;
|
||||
}
|
||||
var_reset(result);
|
||||
return FAILURE;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
result->type = IS_BOOL;
|
||||
if ( is_identical_function( result, op1, op2 ) == FAILURE ) {
|
||||
if (is_identical_function( result, op1, op2 ) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
result->value.lval = !result->value.lval;
|
||||
@@ -1316,6 +1473,25 @@ ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length)
|
||||
{
|
||||
int len;
|
||||
int c1,c2;
|
||||
|
||||
len = MIN(length, MIN(len1, len2));
|
||||
|
||||
while (len--) {
|
||||
c1 = tolower(*s1++);
|
||||
c2 = tolower(*s2++);
|
||||
if (c1 != c2) {
|
||||
return c1 - c2;
|
||||
}
|
||||
}
|
||||
|
||||
return len1 - len2;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2)
|
||||
{
|
||||
return zend_binary_strcmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len);
|
||||
@@ -1333,6 +1509,12 @@ ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3)
|
||||
{
|
||||
return zend_binary_strncasecmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len, s3->value.lval);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
{
|
||||
int ret1,ret2;
|
||||
@@ -1351,6 +1533,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
str2num(&first,s1->value.str.val,100); /* this scale should do */
|
||||
str2num(&second,s2->value.str.val,100); /* ditto */
|
||||
result->value.lval = bc_compare(first,second);
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
|
||||
result->type = IS_LONG;
|
||||
free_num(&first);
|
||||
free_num(&second);
|
||||
@@ -1363,84 +1546,65 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
dval2 = strtod(s2->value.str.val, NULL);
|
||||
}
|
||||
result->value.dval = dval1 - dval2;
|
||||
result->type = IS_DOUBLE;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.dval);
|
||||
result->type = IS_LONG;
|
||||
} else { /* they both have to be long's */
|
||||
result->value.lval = lval1 - lval2;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
|
||||
result->type = IS_LONG;
|
||||
}
|
||||
} else {
|
||||
result->value.lval = zend_binary_zval_strcmp(s1, s2);
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
|
||||
result->type = IS_LONG;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static int hash_zval_compare_function(const zval **z1, const zval **z2)
|
||||
{
|
||||
zval result;
|
||||
|
||||
if (compare_function(&result, (zval *) *z1, (zval *) *z2)==FAILURE) {
|
||||
return 1;
|
||||
}
|
||||
return result.value.lval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2)
|
||||
{
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2)
|
||||
{
|
||||
zend_compare_symbol_tables(result, a1->value.ht, a2->value.ht);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2)
|
||||
{
|
||||
if (o1->value.obj.ce != o2->value.obj.ce) {
|
||||
result->value.lval = 1; /* Comparing objects of different types is pretty much meaningless */
|
||||
result->type = IS_LONG;
|
||||
return;
|
||||
}
|
||||
zend_compare_symbol_tables(result, o1->value.obj.properties, o2->value.obj.properties);
|
||||
}
|
||||
|
||||
|
||||
/* returns 0 for non-numeric string
|
||||
* returns IS_DOUBLE for floating point string, and assigns the value to *dval (if it's not NULL)
|
||||
* returns IS_LONG for integer strings, and assigns the value to *lval (if it's not NULL)
|
||||
* returns FLAG_IS_BC if the number might lose accuracy when converted to a double
|
||||
*/
|
||||
|
||||
#if 1
|
||||
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
{
|
||||
long local_lval;
|
||||
double local_dval;
|
||||
char *end_ptr;
|
||||
|
||||
if (!length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno=0;
|
||||
local_lval = strtol(str, &end_ptr, 10);
|
||||
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
|
||||
if (lval) {
|
||||
*lval = local_lval;
|
||||
}
|
||||
return IS_LONG;
|
||||
}
|
||||
|
||||
errno=0;
|
||||
local_dval = strtod(str, &end_ptr);
|
||||
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
|
||||
if (! finite(local_dval)) {
|
||||
/* "inf","nan" and maybe other weird ones */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dval) {
|
||||
*dval = local_dval;
|
||||
}
|
||||
#if WITH_BCMATH
|
||||
if (length>16) {
|
||||
register char *ptr=str, *end=str+length;
|
||||
|
||||
while(ptr<end) {
|
||||
switch(*ptr++) {
|
||||
case 'e':
|
||||
case 'E':
|
||||
/* scientific notation, not handled by the BC library */
|
||||
return IS_DOUBLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FLAG_IS_BC;
|
||||
} else {
|
||||
return IS_DOUBLE;
|
||||
}
|
||||
#else
|
||||
return IS_DOUBLE;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
#if 0
|
||||
|
||||
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
{
|
||||
|
||||
+84
-3
@@ -18,8 +18,19 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _OPERATORS_H
|
||||
#define _OPERATORS_H
|
||||
#ifndef ZEND_OPERATORS_H
|
||||
#define ZEND_OPERATORS_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#if WITH_BCMATH
|
||||
#include "ext/bcmath/number.h"
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_LONG 18
|
||||
#define MAX_LENGTH_OF_DOUBLE 32
|
||||
@@ -47,7 +58,66 @@ ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval);
|
||||
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
{
|
||||
long local_lval;
|
||||
double local_dval;
|
||||
char *end_ptr;
|
||||
|
||||
if (!length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno=0;
|
||||
local_lval = strtol(str, &end_ptr, 10);
|
||||
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
|
||||
if (lval) {
|
||||
*lval = local_lval;
|
||||
}
|
||||
return IS_LONG;
|
||||
}
|
||||
|
||||
errno=0;
|
||||
local_dval = strtod(str, &end_ptr);
|
||||
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
|
||||
if (! zend_finite(local_dval)) {
|
||||
/* "inf","nan" and maybe other weird ones */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dval) {
|
||||
*dval = local_dval;
|
||||
}
|
||||
#if WITH_BCMATH
|
||||
if (length>16) {
|
||||
register char *ptr=str, *end=str+length;
|
||||
|
||||
while(ptr<end) {
|
||||
switch(*ptr++) {
|
||||
case 'e':
|
||||
case 'E':
|
||||
/* scientific notation, not handled by the BC library */
|
||||
return IS_DOUBLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FLAG_IS_BC;
|
||||
} else {
|
||||
return IS_DOUBLE;
|
||||
}
|
||||
#else
|
||||
return IS_DOUBLE;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int increment_function(zval *op1);
|
||||
ZEND_API int decrement_function(zval *op2);
|
||||
@@ -65,19 +135,30 @@ ZEND_API void convert_to_object(zval *op);
|
||||
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
|
||||
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
|
||||
|
||||
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
|
||||
END_EXTERN_C()
|
||||
|
||||
ZEND_API int zval_is_true(zval *op);
|
||||
ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
|
||||
|
||||
ZEND_API void zend_str_tolower(char *str, unsigned int length);
|
||||
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
|
||||
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
|
||||
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
|
||||
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3);
|
||||
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
|
||||
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length);
|
||||
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
|
||||
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length);
|
||||
|
||||
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
|
||||
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2);
|
||||
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
|
||||
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
|
||||
|
||||
|
||||
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
|
||||
if ((*ppzv)->type!=IS_##upper_type) { \
|
||||
|
||||
+12
-1
@@ -104,11 +104,22 @@ ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *))
|
||||
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
|
||||
{
|
||||
zend_ptr_stack_apply(stack, func);
|
||||
if (free_elements) {
|
||||
int i = stack->top;
|
||||
|
||||
while (--i >= 0) {
|
||||
efree(stack->elements[i]);
|
||||
}
|
||||
}
|
||||
stack->top = 0;
|
||||
stack->top_element = stack->elements;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
|
||||
{
|
||||
return stack->top;
|
||||
}
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_PTR_STACK_H
|
||||
#define _ZEND_PTR_STACK_H
|
||||
#ifndef ZEND_PTR_STACK_H
|
||||
#define ZEND_PTR_STACK_H
|
||||
|
||||
typedef struct _zend_ptr_stack {
|
||||
int top, max;
|
||||
@@ -37,6 +37,7 @@ ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
|
||||
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
|
||||
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
|
||||
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
|
||||
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *));
|
||||
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
|
||||
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
|
||||
|
||||
#endif /* _ZEND_PTR_STACK_H */
|
||||
#endif /* ZEND_PTR_STACK_H */
|
||||
+3
-3
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_STACK_H
|
||||
#define _ZEND_STACK_H
|
||||
#ifndef ZEND_STACK_H
|
||||
#define ZEND_STACK_H
|
||||
|
||||
typedef struct _zend_stack {
|
||||
int top, max;
|
||||
@@ -44,4 +44,4 @@ ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*
|
||||
#define ZEND_STACK_APPLY_TOPDOWN 1
|
||||
#define ZEND_STACK_APPLY_BOTTOMUP 2
|
||||
|
||||
#endif /* _ZEND_STACK_H */
|
||||
#endif /* ZEND_STACK_H */
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "zend_static_allocator.h"
|
||||
|
||||
/* Not checking emalloc() and erealloc() return values as they are supposed to bailout */
|
||||
|
||||
inline static void block_init(Block *block, zend_uint block_size)
|
||||
{
|
||||
block->pos = block->bp = (char *) emalloc(block_size);
|
||||
block->end = block->bp + block_size;
|
||||
}
|
||||
|
||||
inline static char *block_allocate(Block *block, zend_uint size)
|
||||
{
|
||||
char *retval = block->pos;
|
||||
if ((block->pos += size) >= block->end) {
|
||||
return (char *)NULL;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
inline static void block_destroy(Block *block)
|
||||
{
|
||||
efree(block->bp);
|
||||
}
|
||||
|
||||
void static_allocator_init(StaticAllocator *sa)
|
||||
{
|
||||
sa->Blocks = (Block *) emalloc(sizeof(Block));
|
||||
block_init(sa->Blocks, ALLOCATOR_BLOCK_SIZE);
|
||||
sa->num_blocks = 1;
|
||||
sa->current_block = 0;
|
||||
}
|
||||
|
||||
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size)
|
||||
{
|
||||
char *retval;
|
||||
|
||||
retval = block_allocate(&sa->Blocks[sa->current_block], size);
|
||||
if (retval) {
|
||||
return retval;
|
||||
}
|
||||
sa->Blocks = (Block *) erealloc(sa->Blocks, ++sa->num_blocks);
|
||||
sa->current_block++;
|
||||
block_init(&sa->Blocks[sa->current_block], (size > ALLOCATOR_BLOCK_SIZE) ? size : ALLOCATOR_BLOCK_SIZE);
|
||||
retval = block_allocate(&sa->Blocks[sa->current_block], size);
|
||||
return retval;
|
||||
}
|
||||
|
||||
void static_allocator_destroy(StaticAllocator *sa)
|
||||
{
|
||||
zend_uint i;
|
||||
|
||||
for (i=0; i<sa->num_blocks; i++) {
|
||||
block_free(&sa->Blocks[i]);
|
||||
}
|
||||
efree(sa->Blocks);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef ZEND_STATIC_ALLOCATOR_H
|
||||
#define ZEND_STATIC_ALLOCATOR_H
|
||||
|
||||
#define ALLOCATOR_BLOCK_SIZE 400000
|
||||
|
||||
/* Temporary */
|
||||
typedef unsigned int zend_uint;
|
||||
#define emalloc(s) malloc(s)
|
||||
#define efree(p) free(p)
|
||||
|
||||
typedef struct _Block {
|
||||
char *bp;
|
||||
char *pos;
|
||||
char *end;
|
||||
} Block;
|
||||
|
||||
typedef struct _StaticAllocator {
|
||||
Block *Blocks;
|
||||
zend_uint num_blocks;
|
||||
zend_uint current_block;
|
||||
} StaticAllocator;
|
||||
|
||||
void static_allocator_init(StaticAllocator *sa);
|
||||
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size);
|
||||
void static_allocator_destroy(StaticAllocator *sa);
|
||||
|
||||
#endif /* ZEND_STATIC_ALLOCATOR_H */
|
||||
@@ -61,7 +61,8 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
case IS_CONSTANT:
|
||||
STR_FREE_REL(zvalue->value.str.val);
|
||||
break;
|
||||
case IS_ARRAY: {
|
||||
case IS_ARRAY:
|
||||
case IS_CONSTANT_ARRAY: {
|
||||
ELS_FETCH();
|
||||
|
||||
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
|
||||
@@ -125,7 +126,8 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
}
|
||||
zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
|
||||
break;
|
||||
case IS_ARRAY: {
|
||||
case IS_ARRAY:
|
||||
case IS_CONSTANT_ARRAY: {
|
||||
zval *tmp;
|
||||
HashTable *original_ht = zvalue->value.ht;
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VARIABLES_H
|
||||
#define _VARIABLES_H
|
||||
#ifndef ZEND_VARIABLES_H
|
||||
#define ZEND_VARIABLES_H
|
||||
|
||||
|
||||
ZEND_API int zend_print_variable(zval *var);
|
||||
|
||||
+1
-122
@@ -1,122 +1 @@
|
||||
/* This is the default configuration file to read -*- C -*- */
|
||||
|
||||
/* these are defined by automake */
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
#undef HAVE_STRUCT_FLOCK
|
||||
#undef HAVE_TM_GMTOFF
|
||||
|
||||
#define CONFIGURATION_FILE_PATH "php.ini"
|
||||
#define USE_CONFIG_FILE 1
|
||||
|
||||
#undef HAVE_DMALLOC
|
||||
|
||||
/* Some global constants defined by conigure */
|
||||
#undef PHP_BUILD_DATE
|
||||
#undef PHP_OS
|
||||
#undef PHP_UNAME
|
||||
|
||||
/* define uint by configure if it is missed (QNX and BSD derived) */
|
||||
#undef uint
|
||||
|
||||
/* define ulong by configure if it is missed (most probably is) */
|
||||
#undef ulong
|
||||
|
||||
/* type check for in_addr_t */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */
|
||||
/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define if you have the pam library (-lpam). */
|
||||
#define HAVE_LIBPAM 0
|
||||
|
||||
/* Define if you have the bind library (-lbind). */
|
||||
#define HAVE_LIBBIND 0
|
||||
|
||||
/* Define if you have Netscape LDAP instead of umich ldap or openldap*/
|
||||
#define HAVE_NSLDAP 0
|
||||
|
||||
/* Define if you want safe mode enabled by default. */
|
||||
#define PHP_SAFE_MODE 0
|
||||
|
||||
/* Set to the path to the dir containing safe mode executables */
|
||||
#define PHP_SAFE_MODE_EXEC_DIR /usr/local/php/bin
|
||||
|
||||
/* Define if you want POST/GET/Cookie track variables by default */
|
||||
#define PHP_TRACK_VARS 0
|
||||
|
||||
/* Undefine if you want stricter XML/SGML compliance by default */
|
||||
/* (this disables "<?expression?>" by default) */
|
||||
#define DEFAULT_SHORT_OPEN_TAG 1
|
||||
|
||||
/* Undefine if you do not want PHP by default to escape "'" */
|
||||
/* in GET/POST/Cookie data */
|
||||
#define MAGIC_QUOTES 1
|
||||
|
||||
/* Define both of these if you want the bundled REGEX library */
|
||||
#define REGEX 0
|
||||
#define HSREGEX 0
|
||||
|
||||
/* Define if you have and want to use libnsl */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define if you have and want to use libsocket */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define if you have the sendmail program available */
|
||||
#define HAVE_SENDMAIL 0
|
||||
|
||||
/* Define if you are compiling PHP as an Apache module with mod_charset patch applied (aka Russian Apache)*/
|
||||
#define USE_TRANSFER_TABLES 0
|
||||
|
||||
/* Define if you are compiling PHP as an fhttpd module */
|
||||
#define FHTTPD 0
|
||||
|
||||
/* Define if your Apache creates an ap_config.h header file (only 1.3b6 and later) */
|
||||
#define HAVE_AP_CONFIG_H 0
|
||||
|
||||
/* Define if your Apache has src/include/compat.h */
|
||||
#define HAVE_OLD_COMPAT_H 0
|
||||
|
||||
/* Define if your Apache has src/include/ap_compat.h */
|
||||
#define HAVE_AP_COMPAT_H 0
|
||||
|
||||
/* Define if you want to enable PHP RPC (experimental) */
|
||||
#define PHP_RPC 0
|
||||
|
||||
/* Define if you want to prevent the CGI from working unless REDIRECT_STATUS is defined in the environment */
|
||||
#define FORCE_CGI_REDIRECT 0
|
||||
|
||||
/* Define if you want to prevent the CGI from using path_info and path_translated */
|
||||
#define DISCARD_PATH 0
|
||||
|
||||
/* Define if you want include() and other functions to be able to open
|
||||
* http and ftp URLs as files.
|
||||
*/
|
||||
#define PHP_URL_FOPEN 0
|
||||
|
||||
/* Define if you have broken header files like SunOS 4 */
|
||||
#define MISSING_FCLOSE_DECL 0
|
||||
|
||||
/* Define to compile PHP/Zend thread safe */
|
||||
#undef ZTS
|
||||
|
||||
/* Define when compiling with Zeus support */
|
||||
#undef WITH_ZEUS
|
||||
|
||||
/* Define if struct sockaddr contains the field sa_len */
|
||||
#undef HAVE_SOCKADDR_SA_LEN
|
||||
|
||||
#undef BROKEN_SPRINTF
|
||||
|
||||
#if BROKEN_SPRINTF
|
||||
#define sprintf php_sprintf
|
||||
#endif
|
||||
/* Leave this file alone */
|
||||
+194
-46
@@ -4,6 +4,128 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
sinclude(dynlib.m4)
|
||||
|
||||
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
|
||||
dnl
|
||||
dnl Use this macro, if you need to add libraries and or library search
|
||||
dnl paths to the PHP build system which are only given in compiler
|
||||
dnl notation.
|
||||
dnl
|
||||
AC_DEFUN(PHP_EVAL_LIBLINE,[
|
||||
for ac_i in $1; do
|
||||
case "$ac_i" in
|
||||
-l*)
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
AC_ADD_LIBRARY($ac_ii,,$2)
|
||||
;;
|
||||
-L*)
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
AC_ADD_LIBPATH($ac_ii,$2)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
])
|
||||
|
||||
dnl PHP_EVAL_INCLINE(LINE)
|
||||
dnl
|
||||
dnl Use this macro, if you need to add header search paths to the PHP
|
||||
dnl build system which are only given in compiler notation.
|
||||
dnl
|
||||
AC_DEFUN(PHP_EVAL_INCLINE,[
|
||||
for ac_i in $1; do
|
||||
case "$ac_i" in
|
||||
-I*)
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
AC_ADD_INCLUDE($ac_ii)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_READDIR_R_TYPE,[
|
||||
dnl HAVE_READDIR_R is also defined by libmysql
|
||||
AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
|
||||
if test "$ac_cv_func_readdir_r" = "yes"; then
|
||||
AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
|
||||
AC_TRY_RUN([
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
main() {
|
||||
DIR *dir;
|
||||
struct dirent entry, *pentry;
|
||||
|
||||
dir = opendir("/");
|
||||
if (!dir)
|
||||
exit(1);
|
||||
if (readdir_r(dir, &entry, &pentry) == 0)
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
],[
|
||||
ac_cv_what_readdir_r=POSIX
|
||||
],[
|
||||
AC_TRY_CPP([
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
int readdir_r(DIR *, struct dirent *);
|
||||
],[
|
||||
ac_cv_what_readdir_r=old-style
|
||||
],[
|
||||
ac_cv_what_readdir_r=none
|
||||
])
|
||||
],[
|
||||
ac_cv_what_readdir_r=none
|
||||
])
|
||||
])
|
||||
case "$ac_cv_what_readdir_r" in
|
||||
POSIX)
|
||||
AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
|
||||
old-style)
|
||||
AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SHLIB_SUFFIX_NAME,[
|
||||
PHP_SUBST(SHLIB_SUFFIX_NAME)
|
||||
SHLIB_SUFFIX_NAME=so
|
||||
case "$host_alias" in
|
||||
*hpux*)
|
||||
SHLIB_SUFFIX_NAME=sl
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_DEBUG_MACRO,[
|
||||
DEBUG_LOG="$1"
|
||||
cat >$1 <<X
|
||||
CONFIGURE: $CONFIGURE_COMMAND
|
||||
CC: $CC
|
||||
CFLAGS: $CFLAGS
|
||||
CPPFLAGS: $CPPFLAGS
|
||||
CXX: $CXX
|
||||
CXXFLAGS: $CXXFLAGS
|
||||
INCLUDES: $INCLUDES
|
||||
LDFLAGS: $LDFLAGS
|
||||
LIBS: $LIBS
|
||||
DLIBS: $DLIBS
|
||||
SAPI: $PHP_SAPI
|
||||
PHP_RPATHS: $PHP_RPATHS
|
||||
uname -a: `uname -a`
|
||||
|
||||
X
|
||||
cat >conftest.$ac_ext <<X
|
||||
main()
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
X
|
||||
(eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
|
||||
rm -fr conftest*
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_MISSING_TIME_R_DECL,[
|
||||
AC_MSG_CHECKING(for missing declarations of reentrant functions)
|
||||
AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
|
||||
@@ -66,7 +188,7 @@ no)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$php_always_shared"; then
|
||||
if test "$php_always_shared" = "yes"; then
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
test "[$]$1" = "no" && $1=yes
|
||||
@@ -126,7 +248,7 @@ EOF
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TIME_R_TYPE,[
|
||||
AC_CACHE_CHECK(for *time_r type, ac_cv_time_r_type,[
|
||||
AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
|
||||
AC_TRY_RUN([
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
@@ -145,13 +267,13 @@ exit(1);
|
||||
],[
|
||||
ac_cv_time_r_type=hpux
|
||||
],[
|
||||
ac_cv_time_r_type=normal
|
||||
ac_cv_time_r_type=POSIX
|
||||
],[
|
||||
ac_cv_time_r_type=normal
|
||||
ac_cv_time_r_type=POSIX
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_time_r_type" = "hpux"; then
|
||||
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-SUX 10.x])
|
||||
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -177,14 +299,17 @@ AC_DEFUN(PHP_MKDIR_P_CHECK,[
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_FAST_GENERATE,[
|
||||
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
|
||||
PHP_MKDIR_P_CHECK
|
||||
echo creating config_vars.mk
|
||||
> config_vars.mk
|
||||
for i in $PHP_VAR_SUBST; do
|
||||
eval echo "$i = \$$i" >> config_vars.mk
|
||||
done
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GEN_MAKEFILES,[
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $1
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TM_GMTOFF,[
|
||||
@@ -194,7 +319,7 @@ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
|
||||
ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
|
||||
|
||||
if test "$ac_cv_struct_tm_gmtoff" = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -206,9 +331,9 @@ AC_DEFUN(PHP_CONFIGURE_PART,[
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_SENDMAIL,[
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
|
||||
if test -n "$PROG_SENDMAIL"; then
|
||||
AC_DEFINE(HAVE_SENDMAIL)
|
||||
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -254,7 +379,7 @@ AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
|
||||
])
|
||||
)
|
||||
if test "$ac_cv_struct_flock" = "yes" ; then
|
||||
AC_DEFINE(HAVE_STRUCT_FLOCK, 1)
|
||||
AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -295,6 +420,14 @@ AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_REQUIRE_CXX,[
|
||||
if test -z "$php_cxx_done"; then
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
php_cxx_done=yes
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_SHARED
|
||||
dnl
|
||||
@@ -322,7 +455,9 @@ dnl
|
||||
dnl execute code, if variable is not set in namespace
|
||||
dnl
|
||||
AC_DEFUN(AC_PHP_ONCE,[
|
||||
unique=`echo $ac_n "$2$ac_c" | tr -cd a-zA-Z0-9`
|
||||
changequote({,})
|
||||
unique=`echo $2|sed 's/[^a-zA-Z0-9]/_/g'`
|
||||
changequote([,])
|
||||
cmd="echo $ac_n \"\$$1$unique$ac_c\""
|
||||
if test -n "$unique" && test "`eval $cmd`" = "" ; then
|
||||
eval "$1$unique=set"
|
||||
@@ -348,18 +483,22 @@ AC_DEFUN(AC_EXPAND_PATH,[
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBPATH(path)
|
||||
dnl AC_ADD_LIBPATH(path[, shared-libadd])
|
||||
dnl
|
||||
dnl add a library to linkpath/runpath
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBPATH,[
|
||||
if test "$1" != "/usr/lib"; then
|
||||
AC_EXPAND_PATH($1, ai_p)
|
||||
AC_PHP_ONCE(LIBPATH, $ai_p, [
|
||||
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
|
||||
LDFLAGS="$LDFLAGS -L$ai_p"
|
||||
PHP_RPATHS="$PHP_RPATHS $ai_p"
|
||||
])
|
||||
if test "$ext_shared" = "yes" && test -n "$2"; then
|
||||
$2="-R$1 -L$1 [$]$2"
|
||||
else
|
||||
AC_PHP_ONCE(LIBPATH, $ai_p, [
|
||||
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
|
||||
LDFLAGS="$LDFLAGS -L$ai_p"
|
||||
PHP_RPATHS="$PHP_RPATHS $ai_p"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -394,17 +533,30 @@ AC_DEFUN(AC_ADD_INCLUDE,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_X_ADD_LIBRARY,[
|
||||
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBRARY(library[, append])
|
||||
dnl AC_ADD_LIBRARY(library[, append[, shared-libadd]])
|
||||
dnl
|
||||
dnl add a library to the link line
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBRARY,[
|
||||
AC_PHP_ONCE(LIBRARY, $1, [
|
||||
if test "$1" != "c"; then
|
||||
ifelse($#, 1, LIBS="-l$1 $LIBS", LIBS="$LIBS -l$1")
|
||||
fi
|
||||
])
|
||||
case "$1" in
|
||||
c|c_r|pthread*) ;;
|
||||
*)
|
||||
ifelse($3,,[
|
||||
PHP_X_ADD_LIBRARY($1,$2,LIBS)
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
PHP_X_ADD_LIBRARY($1,$2,$3)
|
||||
else
|
||||
AC_ADD_LIBRARY($1,$2)
|
||||
fi
|
||||
])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -412,9 +564,7 @@ dnl AC_ADD_LIBRARY_DEFER(library[, append])
|
||||
dnl
|
||||
dnl add a library to the link line (deferred)
|
||||
AC_DEFUN(AC_ADD_LIBRARY_DEFER,[
|
||||
AC_PHP_ONCE(LIBRARY, $1, [
|
||||
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
|
||||
])
|
||||
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -432,17 +582,13 @@ ifelse($3,,[
|
||||
AC_ADD_LIBRARY($1)
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
$3="-l$1 [$]$3"
|
||||
if test -n "$2"; then
|
||||
$3="-R$2 -L$2 -l$1 [$]$3"
|
||||
else
|
||||
$3="-l$1 [$]$3"
|
||||
AC_ADD_LIBPATH($2,$3)
|
||||
fi
|
||||
else
|
||||
if test -n "$2"; then
|
||||
AC_ADD_LIBPATH($2)
|
||||
fi
|
||||
AC_ADD_LIBRARY($1)
|
||||
fi
|
||||
AC_ADD_LIBRARY_WITH_PATH($1,$2)
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
@@ -467,7 +613,9 @@ dnl
|
||||
AC_DEFUN(AC_CHECK_CC_OPTION,[
|
||||
echo "main(){return 0;}" > conftest.$ac_ext
|
||||
opt="$1"
|
||||
var=`echo $ac_n "$opt$ac_c"|tr -c a-zA-Z0-9 _`
|
||||
changequote({,})
|
||||
var=`echo $opt|sed 's/[^a-zA-Z0-9]/_/g'`
|
||||
changequote([,])
|
||||
AC_MSG_CHECKING([if compiler supports -$1 really])
|
||||
ac_php_compile="${CC-cc} -$opt -o conftest $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
|
||||
if eval $ac_php_compile 2>&1 | egrep "$opt" > /dev/null 2>&1 ; then
|
||||
@@ -489,11 +637,11 @@ AC_DEFUN(PHP_REGEX,[
|
||||
if test "$REGEX_TYPE" = "php"; then
|
||||
REGEX_LIB=regex/libregex.la
|
||||
REGEX_DIR=regex
|
||||
AC_DEFINE(HSREGEX)
|
||||
AC_DEFINE(REGEX,1)
|
||||
AC_DEFINE(HSREGEX,1,[ ])
|
||||
AC_DEFINE(REGEX,1,[ ])
|
||||
PHP_FAST_OUTPUT(regex/Makefile)
|
||||
elif test "$REGEX_TYPE" = "system"; then
|
||||
AC_DEFINE(REGEX,0)
|
||||
AC_DEFINE(REGEX,0,[ ])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(which regex library to use)
|
||||
@@ -510,10 +658,10 @@ dnl
|
||||
AC_DEFUN(AC_MISSING_FCLOSE_DECL,[
|
||||
AC_MSG_CHECKING([for fclose declaration])
|
||||
AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
|
||||
AC_DEFINE(MISSING_FCLOSE_DECL,0)
|
||||
AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
|
||||
AC_MSG_RESULT(ok)
|
||||
],[
|
||||
AC_DEFINE(MISSING_FCLOSE_DECL,1)
|
||||
AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
|
||||
AC_MSG_RESULT(missing)
|
||||
])
|
||||
])
|
||||
@@ -532,9 +680,9 @@ AC_DEFUN(AC_BROKEN_SPRINTF,[
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_broken_sprintf" = "yes"; then
|
||||
AC_DEFINE(BROKEN_SPRINTF, 1)
|
||||
AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [ ])
|
||||
else
|
||||
AC_DEFINE(BROKEN_SPRINTF, 0)
|
||||
AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [ ])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -679,13 +827,13 @@ AC_DEFUN(AC_SOCKADDR_SA_LEN,[
|
||||
#include <sys/socket.h>],
|
||||
[struct sockaddr s; s.sa_len;],
|
||||
[ac_cv_sockaddr_sa_len=yes
|
||||
AC_DEFINE(HAVE_SOCKADDR_SA_LEN)],
|
||||
AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[ ])],
|
||||
[ac_cv_sockaddr_sa_len=no])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ## PHP_AC_OUTPUT(file)
|
||||
dnl ## PHP_OUTPUT(file)
|
||||
dnl ## adds "file" to the list of files generated by AC_OUTPUT
|
||||
dnl ## This macro can be used several times.
|
||||
AC_DEFUN(PHP_OUTPUT,[
|
||||
@@ -726,7 +874,7 @@ int main(void) {
|
||||
ac_cv_ebcdic="no"
|
||||
])])
|
||||
if test "$ac_cv_ebcdic" = "yes"; then
|
||||
AC_DEFINE(CHARSET_EBCDIC,, [Define if system uses EBCDIC])
|
||||
AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
|
||||
fi
|
||||
])
|
||||
|
||||
+13
-21
@@ -1,31 +1,22 @@
|
||||
/* -*- C -*-
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP HTML Embedded Scripting Language Version 3.0 |
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This program is free software; you can redistribute it and/or modify |
|
||||
| it under the terms of one of the following licenses: |
|
||||
| |
|
||||
| A) the GNU General Public License as published by the Free Software |
|
||||
| Foundation; either version 2 of the License, or (at your option) |
|
||||
| any later version. |
|
||||
| |
|
||||
| B) the PHP License as published by the PHP Development Team and |
|
||||
| included in the distribution in the file: LICENSE |
|
||||
| |
|
||||
| This program is distributed in the hope that it will be useful, |
|
||||
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
| GNU General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of both licenses referred to here. |
|
||||
| If you did not, or have any questions about PHP licensing, please |
|
||||
| contact core@php.net. |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@fast.no> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
|
||||
#define PHP_ADA_INCLUDE ""
|
||||
@@ -88,3 +79,4 @@
|
||||
#define PHP_VELOCIS_INCLUDE ""
|
||||
#define PHP_VELOCIS_LIBS ""
|
||||
#define PHP_EXTENSION_DIR "@EXTENSION_DIR@"
|
||||
#define PHP_INCLUDE_PATH "@INCLUDE_PATH@"
|
||||
+1
-1
@@ -52,7 +52,7 @@ acconfig.h: $(acconfig_h_SOURCES)
|
||||
cat $(acconfig_h_SOURCES) > $@
|
||||
|
||||
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding Makefile.in\'s
|
||||
@echo rebuilding Makefile templates
|
||||
@for i in $(LT_TARGETS); do \
|
||||
if test -f "$$i"; then \
|
||||
mv $$i $$i.bak; \
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ exit 1
|
||||
fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
|
||||
if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" && (test "$3" = "c" || test "$3" -ge "3")
|
||||
then
|
||||
echo "buildconf: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
|
||||
+3
-6
@@ -23,7 +23,7 @@
|
||||
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
##############################################################################
|
||||
# $Id: fastgen.sh,v 1.5 2000-05-04 17:50:32 sas Exp $
|
||||
# $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
|
||||
#
|
||||
|
||||
srcdir=$1
|
||||
@@ -43,19 +43,16 @@ fi
|
||||
|
||||
for makefile in $@; do
|
||||
echo "creating $makefile"
|
||||
# portable dirname
|
||||
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
||||
test -d "$dir/" || $mkdir_p "$dir/"
|
||||
$mkdir_p "$dir/"
|
||||
|
||||
(cat <<EOF
|
||||
cat - $top_srcdir/$makefile.in <<EOF >$makefile
|
||||
top_srcdir = $top_srcdir
|
||||
top_builddir = $top_builddir
|
||||
srcdir = $top_srcdir/$dir
|
||||
builddir = $top_builddir/$dir
|
||||
VPATH = $top_srcdir/$dir
|
||||
EOF
|
||||
)| cat - $top_srcdir/$makefile.in > $makefile
|
||||
|
||||
test -z "$dir" || touch $dir/.deps
|
||||
|
||||
done
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo)
|
||||
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
|
||||
|
||||
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
|
||||
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
|
||||
+25
-9
@@ -26,36 +26,52 @@
|
||||
|
||||
include $(top_builddir)/config_vars.mk
|
||||
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
|
||||
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
|
||||
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
||||
|
||||
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@
|
||||
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
||||
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
|
||||
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
|
||||
|
||||
moduledir = $(EXTENSION_DIR)
|
||||
|
||||
CXX_SUFFIX = .cxx
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .slo .c .lo .o .s .y .l
|
||||
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
$(CXX_SUFFIX).o:
|
||||
$(CXX_COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.c.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).lo:
|
||||
$(CXX_PHP_COMPILE)
|
||||
|
||||
.s.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
.c.slo:
|
||||
$(SHARED_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).slo:
|
||||
$(CXX_SHARED_COMPILE)
|
||||
|
||||
.y.c:
|
||||
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
@@ -88,7 +104,7 @@ install-p: $(targets) $(install_targets)
|
||||
distclean-p depend-p clean-p:
|
||||
|
||||
depend: depend-recursive
|
||||
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
|
||||
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
|
||||
|
||||
clean: clean-recursive clean-x
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
|
||||
|
||||
moduledir = $(EXTENSION_DIR)
|
||||
|
||||
|
||||
+85
-76
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## GNU shtool -- The GNU Portable Shell Tool
|
||||
## Copyright (c) 1994-1999 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
## See http://www.gnu.org/software/shtool/ for more information.
|
||||
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
|
||||
##
|
||||
## Version 1.4.7 (24-Dec-1999)
|
||||
## Version 1.4.9 (16-Apr-2000)
|
||||
## Ingredients: 3/17 available modules
|
||||
##
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
##
|
||||
## Not available commands (because module was not built-in):
|
||||
## mdate Pretty-print modification time of a file or dir
|
||||
## table Pretty print a field-separated list as a table
|
||||
## table Pretty-print a field-separated list as a table
|
||||
## prop Display progress with a running propeller
|
||||
## move Move files with simultan substitution
|
||||
## move Move files with simultaneous substitution
|
||||
## mkln Make link with calculation of relative paths
|
||||
## mkshadow Make a shadow tree
|
||||
## mkshadow Make a shadow tree through symbolic links
|
||||
## fixperm Fix file permissions inside a source tree
|
||||
## tarball Roll distribution tarballs
|
||||
## guessos Simple OS/platform guesser
|
||||
## guessos Simple operating system guesser
|
||||
## arx Extended archive command
|
||||
## slo Separate linker options by library class
|
||||
## scpp Sharing C Pre-Processor
|
||||
@@ -65,8 +65,8 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo "This is GNU shtool, version 1.4.7 (24-Dec-1999)"
|
||||
echo "Copyright (c) 1994-1999 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
|
||||
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
echo "Report bugs to <bug-shtool@gnu.org>"
|
||||
echo ''
|
||||
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
|
||||
@@ -94,9 +94,9 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
|
||||
echo ' guessos '
|
||||
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
|
||||
echo ' slo -- -L<dir> -l<lib> [ -L<dir> -l<lib> ... ]'
|
||||
echo ' scpp [-v] [-p] [-o<ofile>] [-t<tfile>] [-M<mark>] [-D<dname>]'
|
||||
echo ' [-C<cname>] <file> [<file> ...]'
|
||||
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
|
||||
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
|
||||
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
|
||||
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
|
||||
echo ' [-d<type>] <file>'
|
||||
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
|
||||
@@ -104,7 +104,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
|
||||
echo "GNU shtool 1.4.7 (24-Dec-1999)"
|
||||
echo "GNU shtool 1.4.9 (16-Apr-2000)"
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
|
||||
@@ -136,13 +136,20 @@ case $tool in
|
||||
str_tool="echo"
|
||||
str_usage="[-n] [-e] [<str> ...]"
|
||||
arg_spec="0+"
|
||||
opt_spec="ne"
|
||||
opt_spec="n.e."
|
||||
opt_n=no
|
||||
opt_e=no
|
||||
;;
|
||||
install )
|
||||
str_tool="install"
|
||||
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
|
||||
arg_spec="2"
|
||||
opt_spec="vtcCsm:o:g:e:"
|
||||
arg_spec="2="
|
||||
opt_spec="v.t.c.C.s.m:o:g:e:"
|
||||
opt_v=no
|
||||
opt_t=no
|
||||
opt_c=no
|
||||
opt_C=no
|
||||
opt_s=no
|
||||
opt_m=""
|
||||
opt_o=""
|
||||
opt_g=""
|
||||
@@ -152,9 +159,17 @@ case $tool in
|
||||
str_tool="mkdir"
|
||||
str_usage="[-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]"
|
||||
arg_spec="1+"
|
||||
opt_spec="tfpm:"
|
||||
opt_spec="t.f.p.m:"
|
||||
opt_t=no
|
||||
opt_f=no
|
||||
opt_p=no
|
||||
opt_m=""
|
||||
;;
|
||||
-* )
|
||||
echo "$0:Error: unknown option \`$tool'" 2>&1
|
||||
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "$0:Error: unknown command \`$tool'" 2>&1
|
||||
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
|
||||
@@ -168,30 +183,24 @@ esac
|
||||
|
||||
# determine name of tool
|
||||
if [ ".$tool" != . ]; then
|
||||
# inside shtool
|
||||
# used inside shtool script
|
||||
toolcmd="$0 $tool"
|
||||
toolcmdhelp="shtool $tool"
|
||||
msgprefix="shtool:$tool"
|
||||
else
|
||||
# standalone
|
||||
# used as standalone script
|
||||
toolcmd="$0"
|
||||
toolcmdhelp="sh.$tool"
|
||||
toolcmdhelp="sh $0"
|
||||
msgprefix="$str_tool"
|
||||
fi
|
||||
|
||||
# parse argument specification string
|
||||
eval `echo $arg_spec | sed -e 's/^\([0-9]*\)\(.*\)/arg_NUMS="\1"; arg_MODE="\2"/'`
|
||||
test ".$arg_MODE" = . && arg_MODE="="
|
||||
eval `echo $arg_spec |\
|
||||
sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'`
|
||||
|
||||
# parse option specification string
|
||||
for opt in `echo "h$opt_spec" | sed -e 's/\([a-zA-Z0-9][:+]*\)/\1 /g'`; do
|
||||
opt_MODE="."
|
||||
eval `echo $opt |\
|
||||
sed -e 's/^\([a-zA-Z0-9]\)/opt_THIS="\1";/' \
|
||||
-e 's/";\([:+]\)/"; opt_MODE="\1";/'`
|
||||
eval "opt_MODE_${opt_THIS}=${opt_MODE}"
|
||||
test "$opt_MODE" = . && eval "opt_${opt_THIS}=no"
|
||||
done
|
||||
eval `echo h.$opt_spec |\
|
||||
sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'`
|
||||
|
||||
# interate over argument line
|
||||
opt_PREV=''
|
||||
@@ -209,7 +218,7 @@ while [ $# -gt 0 ]; do
|
||||
opt_OPT="$opt_PREV"
|
||||
opt_ARG="$1"
|
||||
opt_ARG_OK=yes
|
||||
opt_PREV=""
|
||||
opt_PREV=''
|
||||
else
|
||||
# split argument into option and argument
|
||||
case "$1" in
|
||||
@@ -219,8 +228,7 @@ while [ $# -gt 0 ]; do
|
||||
-e 's/";\(.*\)$/"; opt_ARG="\1"/'`
|
||||
;;
|
||||
-[a-zA-Z0-9])
|
||||
opt_OPT=`awk 'BEGIN { printf("%s", substr(OPT, 2)); }' \
|
||||
"OPT=$1" </dev/null"`
|
||||
opt_OPT=`echo "x$1" | cut -c3-`
|
||||
opt_ARG=''
|
||||
;;
|
||||
*)
|
||||
@@ -243,15 +251,15 @@ while [ $# -gt 0 ]; do
|
||||
|
||||
# process option
|
||||
case $opt_MODE in
|
||||
"." )
|
||||
'.' )
|
||||
# boolean option
|
||||
eval "opt_${opt_OPT}=yes"
|
||||
;;
|
||||
":" )
|
||||
':' )
|
||||
# option with argument (multiple occurances override)
|
||||
eval "opt_${opt_OPT}=\"\$opt_ARG\""
|
||||
;;
|
||||
"+" )
|
||||
'+' )
|
||||
# option with argument (multiple occurances append)
|
||||
eval "opt_${opt_OPT}=\"\$opt_${opt_OPT} \$opt_ARG\""
|
||||
;;
|
||||
@@ -276,14 +284,14 @@ fi
|
||||
|
||||
# complain about incorrect number of arguments
|
||||
case $arg_MODE in
|
||||
"=" )
|
||||
'=' )
|
||||
if [ $# -ne $arg_NUMS ]; then
|
||||
echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2
|
||||
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"+" )
|
||||
'+' )
|
||||
if [ $# -lt $arg_NUMS ]; then
|
||||
echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2
|
||||
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
|
||||
@@ -294,13 +302,12 @@ esac
|
||||
|
||||
# establish a temporary file on request
|
||||
if [ ".$gen_tmpfile" = .yes ]; then
|
||||
tmpdir="/tmp"
|
||||
if [ ".$TMPDIR" != . ]; then
|
||||
tmpdir="$TMPDIR"
|
||||
elif [ ".$TEMPDIR" != . ]; then
|
||||
tmpdir="$TEMPDIR"
|
||||
else
|
||||
if [ ".$TEMPDIR" != . ]; then
|
||||
tmpdir="$TEMPDIR"
|
||||
fi
|
||||
tmpdir="/tmp"
|
||||
fi
|
||||
tmpfile="$tmpdir/.shtool.$$"
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
@@ -316,7 +323,7 @@ case $tool in
|
||||
echo )
|
||||
##
|
||||
## echo -- Print string with optional construct expansion
|
||||
## Copyright (c) 1998-1999 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for WML as buildinfo
|
||||
##
|
||||
|
||||
@@ -343,8 +350,8 @@ echo )
|
||||
term_bold=''
|
||||
term_norm=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
|
||||
# the most important terminals we directly know
|
||||
case $TERM in
|
||||
# for the most important terminal types we directly know the sequences
|
||||
xterm|xterm*|vt220|vt220*)
|
||||
term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
|
||||
term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
|
||||
@@ -353,35 +360,37 @@ echo )
|
||||
term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
|
||||
term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
|
||||
;;
|
||||
esac
|
||||
# then try a possibly existing "tput" or "tcout" utility
|
||||
paths=`echo $PATH | sed -e 's/:/ /g'`
|
||||
for tool in tput tcout; do
|
||||
for dir in $paths; do
|
||||
if [ -r "$dir/$tool" ]; then
|
||||
for seq in bold md smso; do # smso is last
|
||||
bold="`$dir/$tool $seq 2>/dev/null`"
|
||||
if [ ".$bold" != . ]; then
|
||||
term_bold="$bold"
|
||||
# for all others, we try to use a possibly existing `tput' or `tcout' utility
|
||||
* )
|
||||
paths=`echo $PATH | sed -e 's/:/ /g'`
|
||||
for tool in tput tcout; do
|
||||
for dir in $paths; do
|
||||
if [ -r "$dir/$tool" ]; then
|
||||
for seq in bold md smso; do # 'smso' is last
|
||||
bold="`$dir/$tool $seq 2>/dev/null`"
|
||||
if [ ".$bold" != . ]; then
|
||||
term_bold="$bold"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ".$term_bold" != . ]; then
|
||||
for seq in sgr0 me rmso reset; do # 'reset' is last
|
||||
norm="`$dir/$tool $seq 2>/dev/null`"
|
||||
if [ ".$norm" != . ]; then
|
||||
term_norm="$norm"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ".$term_bold" != . ]; then
|
||||
for seq in sgr0 me rmso reset; do # 'reset' is last
|
||||
norm="`$dir/$tool $seq 2>/dev/null`"
|
||||
if [ ".$norm" != . ]; then
|
||||
term_norm="$norm"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
|
||||
break;
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
done
|
||||
;;
|
||||
esac
|
||||
if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
|
||||
echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
|
||||
fi
|
||||
@@ -525,7 +534,7 @@ echo )
|
||||
echo $seo "$text"
|
||||
else
|
||||
# the harder part: echo -n is best, because
|
||||
# awk complains about some \xx sequences.
|
||||
# awk may complain about some \xx sequences.
|
||||
if [ ".$minusn" != . ]; then
|
||||
echo $seo $minusn "$text"
|
||||
else
|
||||
@@ -537,7 +546,7 @@ echo )
|
||||
install )
|
||||
##
|
||||
## install -- Install a program, script or datafile
|
||||
## Copyright (c) 1997-1999 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for shtool
|
||||
##
|
||||
|
||||
@@ -644,24 +653,24 @@ install )
|
||||
mkdir )
|
||||
##
|
||||
## mkdir -- Make one or more directories
|
||||
## Copyright (c) 1996-1999 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
## Cleaned up and enhanced for shtool
|
||||
##
|
||||
|
||||
errstatus=0
|
||||
for p in ${1+"$@"}; do
|
||||
# when the directory already exists...
|
||||
# if the directory already exists...
|
||||
if [ -d "$p" ]; then
|
||||
if [ ".$opt_f" = .no ]; then
|
||||
echo "$msgprefix:Error: file exists: $p" 1>&2
|
||||
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
|
||||
echo "$msgprefix:Error: directory already exists: $p" 1>&2
|
||||
errstatus=1
|
||||
break
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
# when the directory has to be created
|
||||
# if the directory has to be created...
|
||||
if [ ".$opt_p" = .no ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "mkdir $p" 1>&2
|
||||
@@ -675,7 +684,7 @@ mkdir )
|
||||
-e 's/\// /g' \
|
||||
-e 's/^%/\//'`
|
||||
shift
|
||||
pathcomp=
|
||||
pathcomp=''
|
||||
for d in ${1+"$@"}; do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
|
||||
-244
@@ -1,244 +0,0 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on calendar.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=calendar - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to calendar - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "calendar - Win32 Release" && "$(CFG)" != "calendar - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "calendar.mak" CFG="calendar - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "calendar - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "calendar - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "calendar - Win32 Release"
|
||||
|
||||
OUTDIR=.\module_release
|
||||
INTDIR=.\module_release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_calendar.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\calendar.obj"
|
||||
-@erase "$(INTDIR)\dow.obj"
|
||||
-@erase "$(INTDIR)\french.obj"
|
||||
-@erase "$(INTDIR)\gregor.obj"
|
||||
-@erase "$(INTDIR)\jewish.obj"
|
||||
-@erase "$(INTDIR)\julian.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\php3_calendar.dll"
|
||||
-@erase "$(OUTDIR)\php3_calendar.exp"
|
||||
-@erase "$(OUTDIR)\php3_calendar.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /D "NDEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\calendar.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\calendar.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:1 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_calendar.pdb" /machine:I386 /out:"$(OUTDIR)\php3_calendar.dll" /implib:"$(OUTDIR)\php3_calendar.lib" /libpath:"cgi_release"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\calendar.obj" \
|
||||
"$(INTDIR)\dow.obj" \
|
||||
"$(INTDIR)\french.obj" \
|
||||
"$(INTDIR)\gregor.obj" \
|
||||
"$(INTDIR)\jewish.obj" \
|
||||
"$(INTDIR)\julian.obj"
|
||||
|
||||
"$(OUTDIR)\php3_calendar.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "calendar - Win32 Debug"
|
||||
|
||||
OUTDIR=.\module_debug
|
||||
INTDIR=.\module_debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_calendar.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\calendar.obj"
|
||||
-@erase "$(INTDIR)\dow.obj"
|
||||
-@erase "$(INTDIR)\french.obj"
|
||||
-@erase "$(INTDIR)\gregor.obj"
|
||||
-@erase "$(INTDIR)\jewish.obj"
|
||||
-@erase "$(INTDIR)\julian.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\php3_calendar.dll"
|
||||
-@erase "$(OUTDIR)\php3_calendar.exp"
|
||||
-@erase "$(OUTDIR)\php3_calendar.ilk"
|
||||
-@erase "$(OUTDIR)\php3_calendar.lib"
|
||||
-@erase "$(OUTDIR)\php3_calendar.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /D "DEBUG" /D "_DEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\calendar.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\calendar.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:1 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_calendar.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_calendar.dll" /implib:"$(OUTDIR)\php3_calendar.lib" /pdbtype:sept /libpath:"cgi_debug"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\calendar.obj" \
|
||||
"$(INTDIR)\dow.obj" \
|
||||
"$(INTDIR)\french.obj" \
|
||||
"$(INTDIR)\gregor.obj" \
|
||||
"$(INTDIR)\jewish.obj" \
|
||||
"$(INTDIR)\julian.obj"
|
||||
|
||||
"$(OUTDIR)\php3_calendar.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("calendar.dep")
|
||||
!INCLUDE "calendar.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "calendar.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "calendar - Win32 Release" || "$(CFG)" == "calendar - Win32 Debug"
|
||||
SOURCE=.\dl\calendar\calendar.c
|
||||
|
||||
"$(INTDIR)\calendar.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\calendar\dow.c
|
||||
|
||||
"$(INTDIR)\dow.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\calendar\french.c
|
||||
|
||||
"$(INTDIR)\french.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\calendar\gregor.c
|
||||
|
||||
"$(INTDIR)\gregor.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\calendar\jewish.c
|
||||
|
||||
"$(INTDIR)\jewish.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\calendar\julian.c
|
||||
|
||||
"$(INTDIR)\julian.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
Vendored
+146
-84
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
@@ -23,8 +23,7 @@
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
# Please send patches to <autoconf-patches@gnu.org>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -68,6 +67,43 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-cbm ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format.
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
@@ -77,41 +113,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
@@ -129,9 +175,6 @@ EOF
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -162,9 +205,6 @@ EOF
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
@@ -221,15 +261,12 @@ EOF
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
||||
# to the lowercase version "mint" (or "freemint"). Finally
|
||||
# the system name "TOS" denotes a system which is actually not
|
||||
@@ -253,15 +290,9 @@ EOF
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -274,9 +305,6 @@ EOF
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:NetBSD:*:*)
|
||||
echo powerpc-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
@@ -292,6 +320,7 @@ EOF
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -331,7 +360,7 @@ EOF
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
[ ${TARGET_BINARY_INTERFACE}x = x ]
|
||||
@@ -408,7 +437,7 @@ EOF
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
||||
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
|
||||
exit 0 ;; # report: romp-ibm BSD 4.3
|
||||
*:BOSX:*:*)
|
||||
@@ -429,6 +458,8 @@ EOF
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -553,10 +584,13 @@ EOF
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE}
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
@@ -569,13 +603,10 @@ EOF
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
@@ -585,17 +616,8 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
@@ -644,6 +666,10 @@ EOF
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf_i?86)
|
||||
echo "${UNAME_MACHINE}-pc-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
@@ -657,7 +683,7 @@ EOF
|
||||
exit 0
|
||||
;;
|
||||
elf32arm*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
|
||||
exit 0
|
||||
;;
|
||||
armelf_linux*)
|
||||
@@ -668,7 +694,7 @@ EOF
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32ppc)
|
||||
elf32ppc | elf32ppclinux)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
@@ -695,7 +721,7 @@ EOF
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0
|
||||
@@ -703,43 +729,53 @@ EOF
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
@@ -753,6 +789,7 @@ EOF
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -768,6 +805,8 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
elif test "${UNAME_MACHINE}" = "s390"; then
|
||||
echo s390-ibm-linux && exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
@@ -789,6 +828,7 @@ EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -860,7 +900,11 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
@@ -974,8 +1018,26 @@ EOF
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-qnx-qnx${UNAME_VERSION}
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-W:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
BS2000:POSIX*:*:*)
|
||||
echo bs2000-siemens-sysv
|
||||
exit 0 ;;
|
||||
DS/*:UNIX_System_V:*:*)
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
|
||||
Vendored
+52
-16
@@ -1,6 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@@ -25,6 +27,9 @@
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
@@ -68,7 +73,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
linux-gnu*)
|
||||
nto-qnx* | linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -169,15 +174,18 @@ case $basic_machine in
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | fr30)
|
||||
| thumb | d10v | fr30 | avr)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
@@ -201,8 +209,11 @@ case $basic_machine in
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
@@ -210,9 +221,10 @@ case $basic_machine in
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | t3e-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -464,9 +476,6 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
i386-qnx | qnx)
|
||||
basic_machine=i386-qnx
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -513,6 +522,10 @@ case $basic_machine in
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -585,6 +598,9 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
@@ -729,6 +745,10 @@ case $basic_machine in
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
sv1)
|
||||
basic_machine=sv1-cray
|
||||
os=-unicos
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
@@ -918,12 +938,25 @@ case $os in
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
case $basic_machine in
|
||||
x86-* | i[34567]86-*)
|
||||
;;
|
||||
*)
|
||||
os=-nto$os
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
@@ -940,6 +973,9 @@ case $os in
|
||||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
@@ -964,6 +1000,9 @@ case $os in
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk)
|
||||
os=-nsk
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
@@ -977,9 +1016,6 @@ case $os in
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-qnx)
|
||||
os=-qnx4
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
|
||||
+172
-133
@@ -3,16 +3,9 @@ dnl ## Process this file with autoconf to produce a configure script.
|
||||
|
||||
divert(1)
|
||||
|
||||
AC_INIT(main.c)
|
||||
AC_INIT(README.CVS-RULES)
|
||||
|
||||
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile)
|
||||
|
||||
dnl Because ``make install'' is often performed by the superuser,
|
||||
dnl we create the libs subdirectory as the user who configures PHP.
|
||||
dnl Otherwise, the current user will not be able to delete libs
|
||||
dnl or the contents of libs.
|
||||
test -d libs || mkdir libs
|
||||
rm -f libs/*
|
||||
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile main/Makefile)
|
||||
|
||||
if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
|
||||
AC_MSG_ERROR(--with-shared-apache is not supported. Please refer to the documentation for using APXS)
|
||||
@@ -34,6 +27,14 @@ php_shtool="$srcdir/build/shtool"
|
||||
T_MD=`$php_shtool echo -n -e %B`
|
||||
T_ME=`$php_shtool echo -n -e %b`
|
||||
|
||||
dnl Because ``make install'' is often performed by the superuser,
|
||||
dnl we create the libs subdirectory as the user who configures PHP.
|
||||
dnl Otherwise, the current user will not be able to delete libs
|
||||
dnl or the contents of libs.
|
||||
|
||||
$php_shtool mkdir -p libs
|
||||
rm -f libs/*
|
||||
|
||||
dnl ## Diversion 2 is the initial checking of OS features, programs,
|
||||
dnl ## libraries and so on.
|
||||
|
||||
@@ -50,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
|
||||
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
|
||||
|
||||
dnl ## This is where the version number is changed from now on!
|
||||
AM_INIT_AUTOMAKE(php, 4.0RC2)
|
||||
AM_INIT_AUTOMAKE(php, 4.0.2-dev)
|
||||
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
@@ -89,6 +90,15 @@ fi
|
||||
AC_PROG_CC
|
||||
AC_AIX
|
||||
|
||||
case "$host_alias" in
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
|
||||
*dgux*)
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
|
||||
*rhapsody*)
|
||||
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
|
||||
esac
|
||||
|
||||
AM_PROG_CC_STDC
|
||||
|
||||
AC_PROG_RANLIB
|
||||
@@ -113,12 +123,13 @@ divert(2)
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
PHP_SHLIB_SUFFIX_NAME
|
||||
|
||||
PHP_SAPI=cgi
|
||||
PHP_BUILD_PROGRAM
|
||||
dnl paths to the targets relative to the build directory
|
||||
dnl paths to the targets are relative to the build directory
|
||||
SAPI_PROGRAM=php
|
||||
dnl on HP-UX, the extension is .sl. Need to improve this
|
||||
SAPI_SHARED=libs/libphp4.s*
|
||||
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
|
||||
SAPI_STATIC=libs/libphp4.a
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring SAPI modules)
|
||||
@@ -165,11 +176,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl AC_PROG_INSTALL
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
|
||||
if test -n "$PROG_SENDMAIL"; then
|
||||
AC_DEFINE(HAVE_SENDMAIL)
|
||||
fi
|
||||
PHP_PROG_SENDMAIL
|
||||
|
||||
dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
|
||||
PHP_EBCDIC
|
||||
@@ -179,7 +186,7 @@ dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
|
||||
dnl and source packages. This should be harmless on other OSs.
|
||||
dnl
|
||||
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
CFLAGS="$CFLAGS -I/usr/pkg/include"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
|
||||
@@ -188,7 +195,7 @@ INCLUDES="$INCLUDES -I\$(top_builddir)/Zend -I\$(top_srcdir)"
|
||||
|
||||
AC_CHECK_LIB(socket, socket, [
|
||||
AC_ADD_LIBRARY(socket)
|
||||
AC_DEFINE(HAVE_LIBSOCKET) ], [
|
||||
AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
|
||||
AC_CHECK_LIB(socket, htonl, [
|
||||
AC_ADD_LIBRARY(socket)
|
||||
])])
|
||||
@@ -206,10 +213,10 @@ if test "$php_no_nsl_checks" != "yes"; then
|
||||
|
||||
AC_CHECK_LIB(nsl, gethostname, [
|
||||
AC_ADD_LIBRARY(nsl)
|
||||
AC_DEFINE(HAVE_LIBNSL) ],[
|
||||
AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[
|
||||
AC_CHECK_LIB(nsl, gethostbyaddr, [
|
||||
AC_ADD_LIBRARY(nsl)
|
||||
AC_DEFINE(HAVE_LIBNSL) ], [])
|
||||
AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], [])
|
||||
])
|
||||
|
||||
fi
|
||||
@@ -226,7 +233,7 @@ AC_CHECK_LIB(m, sin)
|
||||
|
||||
AC_CHECK_LIB(bind, inet_aton, [
|
||||
AC_ADD_LIBRARY(bind)
|
||||
AC_DEFINE(HAVE_LIBBIND) ], [])
|
||||
AC_DEFINE(HAVE_LIBBIND,1,[Whether you have bind]) ], [])
|
||||
|
||||
AC_CHECK_LIB(resolv, inet_aton)
|
||||
|
||||
@@ -237,10 +244,10 @@ AC_CHECK_LIB(socket, res_search, [
|
||||
AC_CHECK_LIB(resolv, dn_skipname)
|
||||
AC_CHECK_LIB(resolv, __dn_skipname)
|
||||
LIBS="$LIBS -lsocket"
|
||||
AC_DEFINE(HAVE_LIBSOCKET) ], [
|
||||
AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
|
||||
AC_CHECK_LIB(resolv, res_search, [
|
||||
LIBS="$LIBS -lresolv"
|
||||
AC_DEFINE(HAVE_LIBRESOLV)
|
||||
AC_DEFINE(HAVE_LIBRESOLV,1,[ ])
|
||||
], [
|
||||
AC_CHECK_LIB(resolv, dn_skipname)
|
||||
AC_CHECK_LIB(resolv, __dn_skipname)
|
||||
@@ -259,23 +266,23 @@ fi
|
||||
AC_MISSING_FCLOSE_DECL
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS(
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
crypt.h \
|
||||
dlfcn.h \
|
||||
fcntl.h \
|
||||
grp.h \
|
||||
ieeefp.h \
|
||||
limits.h \
|
||||
locale.h \
|
||||
memory.h \
|
||||
netinet/in.h \
|
||||
pwd.h \
|
||||
signal.h \
|
||||
stdarg.h \
|
||||
stdlib.h \
|
||||
string.h \
|
||||
syslog.h \
|
||||
sys/file.h \
|
||||
sys/mman.h \
|
||||
sys/resource.h \
|
||||
sys/select.h \
|
||||
sys/socket.h \
|
||||
sys/statfs.h \
|
||||
@@ -284,10 +291,9 @@ sys/time.h \
|
||||
sys/types.h \
|
||||
sys/varargs.h \
|
||||
sys/wait.h \
|
||||
sys/resource.h \
|
||||
syslog.h \
|
||||
unistd.h \
|
||||
unix.h \
|
||||
utime.h \
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
@@ -334,6 +340,7 @@ getrusage \
|
||||
gettimeofday \
|
||||
gmtime_r \
|
||||
inet_aton \
|
||||
isascii \
|
||||
link \
|
||||
localtime_r \
|
||||
lockf \
|
||||
@@ -345,7 +352,6 @@ putenv \
|
||||
random \
|
||||
rand_r \
|
||||
regcomp \
|
||||
rint \
|
||||
setitimer \
|
||||
setlocale \
|
||||
setsockopt \
|
||||
@@ -357,6 +363,7 @@ srand48 \
|
||||
srandom \
|
||||
statfs \
|
||||
statvfs \
|
||||
std_syslog \
|
||||
strcasecmp \
|
||||
strdup \
|
||||
strerror \
|
||||
@@ -378,6 +385,7 @@ AC_FUNC_ALLOCA
|
||||
AC_BROKEN_SPRINTF
|
||||
PHP_DECLARED_TIMEZONE
|
||||
PHP_TIME_R_TYPE
|
||||
PHP_READDIR_R_TYPE
|
||||
|
||||
dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
|
||||
dnl AC_MSG_CHECKING(for in_addr_t)
|
||||
@@ -396,7 +404,7 @@ changequote([,]), [#include <sys/types.h>
|
||||
|
||||
dnl AC_MSG_RESULT($ac_cv_type_in_addr_t)
|
||||
if test $ac_cv_type_in_addr_t = no; then
|
||||
AC_DEFINE(in_addr_t, u_int)
|
||||
AC_DEFINE(in_addr_t, u_int, [ ])
|
||||
fi
|
||||
|
||||
divert(4)
|
||||
@@ -416,15 +424,15 @@ if test "$PHP_CONFIG_FILE_PATH" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$PHP_CONFIG_FILE_PATH" != "no"; then
|
||||
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH")
|
||||
AC_DEFINE(USE_CONFIG_FILE, 1)
|
||||
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH",[ ])
|
||||
AC_DEFINE(USE_CONFIG_FILE, 1, [ ])
|
||||
else
|
||||
AC_DEFINE(CONFIGURATION_FILE_PATH, 0)
|
||||
AC_DEFINE(USE_CONFIG_FILE, 0)
|
||||
AC_DEFINE(CONFIGURATION_FILE_PATH, 0, [ ])
|
||||
AC_DEFINE(USE_CONFIG_FILE, 0, [ ])
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
|
||||
[ --disable-debug Compile without debugging symbols.], yes)
|
||||
[ --enable-debug Compile with debugging symbols.], no)
|
||||
|
||||
if test "$PHP_DEBUG" = "yes"; then
|
||||
PHP_DEBUG=1
|
||||
@@ -441,9 +449,9 @@ PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
|
||||
[ --enable-safe-mode Enable safe mode by default.])
|
||||
|
||||
if test "$PHP_SAFE_MODE" = "yes"; then
|
||||
AC_DEFINE(PHP_SAFE_MODE, 1)
|
||||
AC_DEFINE(PHP_SAFE_MODE,1,[ ])
|
||||
else
|
||||
AC_DEFINE(PHP_SAFE_MODE, 0)
|
||||
AC_DEFINE(PHP_SAFE_MODE,0,[ ])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for safe mode exec dir)
|
||||
@@ -453,37 +461,37 @@ AC_ARG_WITH(exec-dir,
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
if test "$withval" = "yes"; then
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT(/usr/local/php/bin)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval")
|
||||
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
|
||||
AC_MSG_RESULT($withval)
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT(/usr/local/php/bin)
|
||||
fi
|
||||
],[
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT(/usr/local/php/bin)
|
||||
])
|
||||
|
||||
PHP_ARG_ENABLE(track-vars,whether to enable track_vars variables by default,
|
||||
[ --enable-track-vars Enable GET/POST/Cookie track variables by default.],yes)
|
||||
PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
|
||||
[ --enable-sigchild Enable PHP's own SIGCHLD handler.],no)
|
||||
|
||||
if test "$PHP_TRACK_VARS" = "yes"; then
|
||||
AC_DEFINE(PHP_TRACK_VARS, 1)
|
||||
if test "$PHP_SIGCHILD" = "yes"; then
|
||||
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
|
||||
else
|
||||
AC_DEFINE(PHP_TRACK_VARS, 0)
|
||||
AC_DEFINE(PHP_SIGCHILD, 0, [ ])
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default,
|
||||
[ --enable-magic-quotes Enable magic quotes by default.])
|
||||
|
||||
if test "$PHP_MAGIC_QUOTES" = "yes"; then
|
||||
AC_DEFINE(MAGIC_QUOTES, 1)
|
||||
AC_DEFINE(MAGIC_QUOTES, 1, [ ])
|
||||
else
|
||||
AC_DEFINE(MAGIC_QUOTES, 0)
|
||||
AC_DEFINE(MAGIC_QUOTES, 0, [ ])
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(rpath, whether to enable runpaths,
|
||||
@@ -502,78 +510,53 @@ if test "$PHP_LIBGCC" = "yes"; then
|
||||
AC_ADD_LIBRARY(gcc, yes)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether to enable short tags by default)
|
||||
AC_ARG_ENABLE(short-tags,
|
||||
[ --disable-short-tags Disable the short-form <? start tag by default.],
|
||||
[
|
||||
if test "$enableval" = "no"; then
|
||||
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 0)
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
],[
|
||||
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
])
|
||||
PHP_ARG_ENABLE(short-tags,whether to enable short tags by default,
|
||||
[ --disable-short-tags Disable the short-form <? start tag by default.],yes)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable the URL-aware fopen wrapper)
|
||||
AC_ARG_ENABLE(url-fopen-wrapper,
|
||||
if test "$PHP_SHORT_TAGS" = "yes"; then
|
||||
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,1,[ ])
|
||||
else
|
||||
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,0,[ ])
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(url-fopen-wrapper,whether to enable the URL-aware fopen wrapper,
|
||||
[ --disable-url-fopen-wrapper
|
||||
Disable the URL-aware fopen wrapper that allows
|
||||
accessing files via http or ftp.],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
AC_DEFINE(PHP_URL_FOPEN, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_DEFINE(PHP_URL_FOPEN, 0)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
],[
|
||||
AC_DEFINE(PHP_URL_FOPEN, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
])
|
||||
accessing files via http or ftp.], yes)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable PIC for shared objects)
|
||||
AC_ARG_ENABLE(pic,
|
||||
[ --disable-pic Disable PIC for shared objects],[
|
||||
PHP_PIC=$enableval
|
||||
],[
|
||||
PHP_PIC=yes
|
||||
])
|
||||
AC_MSG_RESULT($PHP_PIC)
|
||||
if test "$PHP_URL_FOPEN_WRAPPER" = "yes"; then
|
||||
AC_DEFINE(PHP_URL_FOPEN, 1, [ ])
|
||||
else
|
||||
AC_DEFINE(PHP_URL_FOPEN, 0, [ ])
|
||||
fi
|
||||
|
||||
DMALLOC_RESULT=no
|
||||
AC_MSG_CHECKING(whether to enable dmalloc)
|
||||
AC_ARG_ENABLE(dmalloc,
|
||||
[ --enable-dmalloc Enable dmalloc],
|
||||
[
|
||||
if test "$enableval" = "yes" ; then
|
||||
AC_DEFINE(HAVE_DMALLOC, 1)
|
||||
AC_ADD_LIBRARY(dmalloc)
|
||||
CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK"
|
||||
DMALLOC_RESULT=yes
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($DMALLOC_RESULT)
|
||||
PHP_ARG_ENABLE(pic,whether to enable PIC for shared objects,
|
||||
[ --disable-pic Disable PIC for shared objects], yes)
|
||||
|
||||
AC_ARG_ENABLE(pear,
|
||||
[ --disable-pear Do not install PEAR],[
|
||||
PHP_PEAR=$enableval
|
||||
],[
|
||||
PHP_PEAR=yes
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether to install PEAR)
|
||||
AC_MSG_RESULT($PHP_PEAR)
|
||||
PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
|
||||
[ --enable-dmalloc Enable dmalloc])
|
||||
|
||||
if test "$PHP_DMALLOC" = "yes"; then
|
||||
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
|
||||
AC_ADD_LIBRARY(dmalloc)
|
||||
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(pear,whether to install PEAR,
|
||||
[ --disable-pear Do not install PEAR],yes)
|
||||
|
||||
if test "$PHP_PEAR" = "yes"; then
|
||||
PEAR_DIR=pear
|
||||
fi
|
||||
|
||||
|
||||
PHP_OUTPUT(pear/pear)
|
||||
PHP_OUTPUT(pear/run-tests)
|
||||
PHP_OUTPUT(pear/phpize)
|
||||
PHP_OUTPUT(pear/php-config)
|
||||
PHP_OUTPUT(pear/PEAR.php)
|
||||
|
||||
|
||||
divert(5)
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring extensions)
|
||||
@@ -631,7 +614,7 @@ LIBZEND_OTHER_CHECKS
|
||||
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
|
||||
TSRM_LIB='TSRM/libtsrm.la'
|
||||
TSRM_DIR=TSRM
|
||||
AC_DEFINE(ZTS)
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
|
||||
PHP_THREAD_SAFETY=yes
|
||||
else
|
||||
@@ -639,7 +622,7 @@ else
|
||||
fi
|
||||
|
||||
if test "$abs_srcdir" != "$abs_builddir"; then
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/Zend"
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
|
||||
if test "$PHP_THREAD_SAFETY" = "yes"; then
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
|
||||
fi
|
||||
@@ -661,7 +644,7 @@ fi
|
||||
|
||||
|
||||
phplibdir="`pwd`/modules"
|
||||
test -d $phplibdir || mkdir $phplibdir
|
||||
$php_shtool mkdir -p $phplibdir
|
||||
phptempdir="`pwd`/libs"
|
||||
|
||||
test "$prefix" = "NONE" && prefix="/usr/local"
|
||||
@@ -685,16 +668,20 @@ ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|s
|
||||
|
||||
EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
|
||||
|
||||
PEAR_INSTALLDIR="$prefix/lib/php"
|
||||
|
||||
INCLUDE_PATH=".:$PEAR_INSTALLDIR"
|
||||
|
||||
AC_BUILD_RPATH
|
||||
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
|
||||
|
||||
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE")
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
|
||||
PHP_UNAME=`uname -a`
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME")
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
|
||||
PHP_OS=`uname`
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
|
||||
|
||||
|
||||
|
||||
@@ -714,19 +701,24 @@ PHP_SUBST(CONFIGURE_COMMAND)
|
||||
PHP_SUBST(CPP)
|
||||
PHP_SUBST(CPPFLAGS)
|
||||
PHP_SUBST(CXX)
|
||||
PHP_SUBST(CXXFLAGS)
|
||||
PHP_SUBST(CXX_PHP_COMPILE)
|
||||
PHP_SUBST(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEFS)
|
||||
PHP_SUBST(EXTENSION_DIR)
|
||||
PHP_SUBST(EXTRA_LDFLAGS)
|
||||
PHP_SUBST(EXTRA_LIBS)
|
||||
PHP_SUBST(INCLUDES)
|
||||
PHP_SUBST(INCLUDE_PATH)
|
||||
PHP_SUBST(INSTALL_IT)
|
||||
PHP_SUBST(LEX)
|
||||
PHP_SUBST(LEX_OUTPUT_ROOT)
|
||||
PHP_SUBST(LFLAGS)
|
||||
PHP_SUBST(LIBTOOL)
|
||||
PHP_SUBST(LN_S)
|
||||
PHP_SUBST(NATIVE_RPATHS)
|
||||
PHP_SUBST(PEAR_DIR)
|
||||
PHP_SUBST(PEAR_INSTALLDIR)
|
||||
PHP_SUBST(PHP_BUILD_DATE)
|
||||
PHP_SUBST(PHP_COMPILE)
|
||||
PHP_SUBST(PHP_LDFLAGS)
|
||||
@@ -770,6 +762,7 @@ if test "$enable_debug" != "yes"; then
|
||||
fi
|
||||
|
||||
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
|
||||
CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
|
||||
|
||||
if test "$enable_shared" = "yes"; then
|
||||
SHARED_LIBTOOL='$(LIBTOOL)'
|
||||
@@ -780,6 +773,7 @@ else
|
||||
SHARED_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
|
||||
else
|
||||
PHP_COMPILE='$(COMPILE) -c $< && touch $@'
|
||||
CXX_PHP_COMPILE='$(CXX_COMPILE) -c $< && touch $@'
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -799,15 +793,21 @@ changequote([,])
|
||||
|
||||
PHP_CONFIGURE_PART(Generating files)
|
||||
|
||||
PHP_FAST_GENERATE
|
||||
PHP_GEN_CONFIG_VARS
|
||||
touch .deps
|
||||
|
||||
#libphp4.module
|
||||
AC_OUTPUT([php4.spec Zend/Makefile
|
||||
build-defs.h
|
||||
$PHP_OUTPUT_FILES
|
||||
], [], [
|
||||
ALL_OUTPUT_FILES="php4.spec Zend/Makefile build-defs.h $PHP_OUTPUT_FILES"
|
||||
|
||||
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
|
||||
|
||||
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES"; then
|
||||
REDO_ALL=yes
|
||||
fi
|
||||
|
||||
if test -n "\$REDO_ALL"; then
|
||||
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
|
||||
fi
|
||||
|
||||
if test ! -f $srcdir/ext/bcmath/number.c; then
|
||||
echo "creating number.c"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
|
||||
@@ -831,25 +831,25 @@ cat >Zend/zend_config.h <<FEO
|
||||
FEO
|
||||
|
||||
# run this only when generating all the files?
|
||||
if true; then
|
||||
if test -n "\$REDO_ALL"; then
|
||||
# Hacking while airborne considered harmful.
|
||||
#
|
||||
echo "creating internal_functions.c"
|
||||
echo "creating main/internal_functions.c"
|
||||
extensions=\`grep '^s.@EXT_STATIC@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
|
||||
mv -f internal_functions.c internal_functions.c.old 2>/dev/null
|
||||
sh $srcdir/genif.sh $srcdir/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" \$extensions > internal_functions.c
|
||||
if cmp internal_functions.c.old internal_functions.c > /dev/null 2>&1; then
|
||||
echo "internal_functions.c is unchanged"
|
||||
mv internal_functions.c.old internal_functions.c
|
||||
mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
|
||||
sh $srcdir/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" \$extensions > main/internal_functions.c
|
||||
if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1; then
|
||||
echo "main/internal_functions.c is unchanged"
|
||||
mv main/internal_functions.c.old main/internal_functions.c
|
||||
else
|
||||
rm -f internal_functions.c.old
|
||||
rm -f main/internal_functions.c.old
|
||||
fi
|
||||
|
||||
if test -n "$PHP_APXS_BROKEN"; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| WARNING: Your $APXS script is most likely broken."
|
||||
echo "| |"
|
||||
echo "| Please go read http://www.php.net/FAQ.php3#4.11 and make the |"
|
||||
echo "| Please go read http://www.php.net/FAQ.php#6.11 and make the |"
|
||||
echo "| changes described there and try again. |"
|
||||
fi
|
||||
|
||||
@@ -858,16 +858,49 @@ if true; then
|
||||
if test "$REDIRECT" = "0"; then
|
||||
if test "$DISCARD_PATH" = "0"; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| Warning: |"
|
||||
echo "| *** WARNING *** |"
|
||||
echo "| |"
|
||||
echo "| You will be compiling the CGI version of PHP without any |"
|
||||
echo "| redirection checking. By putting this cgi binary somewhere in |"
|
||||
echo "| your web space, users may be able to circumvent existing .htaccess |"
|
||||
echo "| security by loading files directly through the parser. See |"
|
||||
echo "| http://www.php.net/manual/config-security.php3 for more details. |"
|
||||
echo "| http://www.php.net/manual/security.php for more details. |"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test -n "$DEBUG_LOG"; then
|
||||
rm -f config.cache
|
||||
cat <<X
|
||||
+--------------------------------------------------------------------+
|
||||
| *** ATTENTION *** |
|
||||
| |
|
||||
| Something is likely to be messed up here, because the configure |
|
||||
| script was not able to detect a simple feature on your platform. |
|
||||
| This is often caused by incorrect configuration parameters. Please |
|
||||
| see the file debug.log for error messages. |
|
||||
| |
|
||||
| If you are unable to fix this, send the file debug.log to the |
|
||||
| php-install@lists.php.net mailing list and include appropiate |
|
||||
| information about your setup. |
|
||||
X
|
||||
fi
|
||||
|
||||
if test "$MYSQL_MODULE_TYPE" = "builtin" ; then
|
||||
cat <<X
|
||||
+--------------------------------------------------------------------+
|
||||
| *** WARNING *** |
|
||||
| |
|
||||
| You chose to compile PHP with the built-in MySQL support. If you |
|
||||
| are compiling a server module, and intend to use other server |
|
||||
| modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0, |
|
||||
| mod_perl) you must NOT rely on PHP's built-in MySQL support, and |
|
||||
| instead build it with your local MySQL support files, by adding |
|
||||
| --with-mysql=/path/to/mysql to your configure line. |
|
||||
X
|
||||
fi
|
||||
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| License: |"
|
||||
echo "| This software is subject to the PHP License, available in this |"
|
||||
@@ -877,6 +910,12 @@ if true; then
|
||||
echo "| the installation process at this point. |"
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
|
||||
cat<<X
|
||||
|
||||
Thank you for using PHP.
|
||||
|
||||
X
|
||||
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on crypt.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=crypt - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to crypt - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "crypt - Win32 Release" && "$(CFG)" != "crypt - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "crypt.mak" CFG="crypt - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "crypt - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "crypt - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "crypt - Win32 Release"
|
||||
|
||||
OUTDIR=.\module_Release
|
||||
INTDIR=.\module_Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_crypt.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\crypt.obj"
|
||||
-@erase "$(INTDIR)\sflcryp.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\php3_crypt.dll"
|
||||
-@erase "$(OUTDIR)\php3_crypt.exp"
|
||||
-@erase "$(OUTDIR)\php3_crypt.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /D HAVE_SFLCRYPT=1 /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\crypt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\crypt.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_crypt.pdb" /machine:I386 /out:"$(OUTDIR)\php3_crypt.dll" /implib:"$(OUTDIR)\php3_crypt.lib" /libpath:"cgi_release"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\crypt.obj" \
|
||||
"$(INTDIR)\sflcryp.obj"
|
||||
|
||||
"$(OUTDIR)\php3_crypt.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "crypt - Win32 Debug"
|
||||
|
||||
OUTDIR=.\module_debug
|
||||
INTDIR=.\module_debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_crypt.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\crypt.obj"
|
||||
-@erase "$(INTDIR)\sflcryp.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\php3_crypt.dll"
|
||||
-@erase "$(OUTDIR)\php3_crypt.exp"
|
||||
-@erase "$(OUTDIR)\php3_crypt.ilk"
|
||||
-@erase "$(OUTDIR)\php3_crypt.lib"
|
||||
-@erase "$(OUTDIR)\php3_crypt.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /I "../../" /D HAVE_SFLCRYPT=1 /D "DEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\crypt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\crypt.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_crypt.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_crypt.dll" /implib:"$(OUTDIR)\php3_crypt.lib" /pdbtype:sept /libpath:"cgi_debug"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\crypt.obj" \
|
||||
"$(INTDIR)\sflcryp.obj"
|
||||
|
||||
"$(OUTDIR)\php3_crypt.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("crypt.dep")
|
||||
!INCLUDE "crypt.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "crypt.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "crypt - Win32 Release" || "$(CFG)" == "crypt - Win32 Debug"
|
||||
SOURCE=.\dl\crypt\crypt.c
|
||||
|
||||
"$(INTDIR)\crypt.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dl\crypt\sflcryp.c
|
||||
|
||||
"$(INTDIR)\sflcryp.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on dbase.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=dbase - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to dbase - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "dbase - Win32 Release" && "$(CFG)" != "dbase - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dbase.mak" CFG="dbase - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dbase - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "dbase - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "dbase - Win32 Release"
|
||||
|
||||
OUTDIR=.\module_release
|
||||
INTDIR=.\module_release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_dbase.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dbase.obj"
|
||||
-@erase "$(INTDIR)\dbf_head.obj"
|
||||
-@erase "$(INTDIR)\dbf_misc.obj"
|
||||
-@erase "$(INTDIR)\dbf_ndx.obj"
|
||||
-@erase "$(INTDIR)\dbf_rec.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\php3_dbase.dll"
|
||||
-@erase "$(OUTDIR)\php3_dbase.exp"
|
||||
-@erase "$(OUTDIR)\php3_dbase.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "dbase\\" /I "./" /I "../" /D DBASE=1 /D "NDEBUG" /D "THREAD_SAFE" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbase.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbase.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:3 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_dbase.pdb" /machine:I386 /out:"$(OUTDIR)\php3_dbase.dll" /implib:"$(OUTDIR)\php3_dbase.lib" /libpath:"cgi_release"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dbase.obj" \
|
||||
"$(INTDIR)\dbf_head.obj" \
|
||||
"$(INTDIR)\dbf_misc.obj" \
|
||||
"$(INTDIR)\dbf_ndx.obj" \
|
||||
"$(INTDIR)\dbf_rec.obj"
|
||||
|
||||
"$(OUTDIR)\php3_dbase.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "dbase - Win32 Debug"
|
||||
|
||||
OUTDIR=.\module_debug
|
||||
INTDIR=.\module_debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_dbase.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dbase.obj"
|
||||
-@erase "$(INTDIR)\dbf_head.obj"
|
||||
-@erase "$(INTDIR)\dbf_misc.obj"
|
||||
-@erase "$(INTDIR)\dbf_ndx.obj"
|
||||
-@erase "$(INTDIR)\dbf_rec.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\php3_dbase.dll"
|
||||
-@erase "$(OUTDIR)\php3_dbase.exp"
|
||||
-@erase "$(OUTDIR)\php3_dbase.ilk"
|
||||
-@erase "$(OUTDIR)\php3_dbase.lib"
|
||||
-@erase "$(OUTDIR)\php3_dbase.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "dbase\\" /I "./" /I "../" /D DBASE=1 /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbase.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbase.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:3 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_dbase.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_dbase.dll" /implib:"$(OUTDIR)\php3_dbase.lib" /pdbtype:sept /libpath:"cgi_debug"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dbase.obj" \
|
||||
"$(INTDIR)\dbf_head.obj" \
|
||||
"$(INTDIR)\dbf_misc.obj" \
|
||||
"$(INTDIR)\dbf_ndx.obj" \
|
||||
"$(INTDIR)\dbf_rec.obj"
|
||||
|
||||
"$(OUTDIR)\php3_dbase.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("dbase.dep")
|
||||
!INCLUDE "dbase.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "dbase.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "dbase - Win32 Release" || "$(CFG)" == "dbase - Win32 Debug"
|
||||
SOURCE=.\functions\dbase.c
|
||||
|
||||
"$(INTDIR)\dbase.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dbase\dbf_head.c
|
||||
|
||||
"$(INTDIR)\dbf_head.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dbase\dbf_misc.c
|
||||
|
||||
"$(INTDIR)\dbf_misc.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dbase\dbf_ndx.c
|
||||
|
||||
"$(INTDIR)\dbf_ndx.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\dbase\dbf_rec.c
|
||||
|
||||
"$(INTDIR)\dbf_rec.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on dbm.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=dbm - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to dbm - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "dbm - Win32 Release" && "$(CFG)" != "dbm - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dbm.mak" CFG="dbm - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "dbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "dbm - Win32 Release"
|
||||
|
||||
OUTDIR=.\module_release
|
||||
INTDIR=.\module_release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\module_release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\php3_dbm.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\db.obj"
|
||||
-@erase "$(INTDIR)\flock.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\php3_dbm.dll"
|
||||
-@erase "$(OUTDIR)\php3_dbm.exp"
|
||||
-@erase "$(OUTDIR)\php3_dbm.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /I "../../include" /D NDBM=1 /D GDBM=0 /D BSD2=1 /D "NDEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbm.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbm.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib libdb.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:2 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_dbm.pdb" /machine:I386 /out:"$(OUTDIR)\php3_dbm.dll" /implib:"$(OUTDIR)\php3_dbm.lib" /libpath:"..\..\lib" /libpath:"cgi_release"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\db.obj" \
|
||||
"$(INTDIR)\flock.obj"
|
||||
|
||||
"$(OUTDIR)\php3_dbm.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "dbm - Win32 Debug"
|
||||
|
||||
OUTDIR=.\module_debug
|
||||
INTDIR=.\module_debug
|
||||
|
||||
ALL : "c:\php3\php3_dbm.dll"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\db.obj"
|
||||
-@erase "$(INTDIR)\flock.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\php3_dbm.exp"
|
||||
-@erase "$(OUTDIR)\php3_dbm.lib"
|
||||
-@erase "$(OUTDIR)\php3_dbm.pdb"
|
||||
-@erase "c:\php3\php3_dbm.dll"
|
||||
-@erase "c:\php3\php3_dbm.ilk"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /I "../../include" /D NDBM=1 /D GDBM=0 /D BSD2=1 /D "DEBUG" /D "_DEBUG" /D COMPILE_DL=1 /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbm.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbm.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=php.lib libdb.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:2 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_dbm.pdb" /debug /machine:I386 /out:"c:\php3/php3_dbm.dll" /implib:"$(OUTDIR)\php3_dbm.lib" /pdbtype:sept /libpath:"..\..\lib" /libpath:"cgi_debug"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\db.obj" \
|
||||
"$(INTDIR)\flock.obj"
|
||||
|
||||
"c:\php3\php3_dbm.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("dbm.dep")
|
||||
!INCLUDE "dbm.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "dbm.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "dbm - Win32 Release" || "$(CFG)" == "dbm - Win32 Debug"
|
||||
SOURCE=.\functions\db.c
|
||||
|
||||
"$(INTDIR)\db.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\win32\flock.c
|
||||
|
||||
"$(INTDIR)\flock.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -1,424 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 1991 Kendall Bennett.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Filename: $RCSfile$
|
||||
* Version: $Revision$
|
||||
*
|
||||
* Language: ANSI C
|
||||
* Environment: any
|
||||
*
|
||||
* Description: Module to implement doubly linked lists. Includes a routine
|
||||
* to peform a mergesort on the doubly linked list.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Revision History:
|
||||
* -----------------
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.2 1999/08/23 19:43:01 sas
|
||||
* malloc.h is deprecated, use stdlib.h instead
|
||||
*
|
||||
* Revision 1.1 1999/07/19 18:58:44 andrey
|
||||
* Moving dlist stuff into core.
|
||||
*
|
||||
* Revision 1.2 1999/05/11 00:01:42 zeev
|
||||
* * Get Apache to work. POST doesn't work yet.
|
||||
* * There are now -I directives for the absolute path of php4, php4/Zend and the builddir for
|
||||
* the Apache module, so we can #include any php/Zend header.
|
||||
* * Rename config.h to php_config.h
|
||||
*
|
||||
* Revision 1.1 1999/04/21 23:11:20 ssb
|
||||
* moved apache, com and hyperwave into ext/
|
||||
*
|
||||
* Revision 1.1.1.1 1999/04/07 21:03:31 zeev
|
||||
* PHP 4.0
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/17 04:29:11 andi
|
||||
* PHP4
|
||||
*
|
||||
* Revision 1.1.1.1 1998/12/21 07:56:22 andi
|
||||
* Trying to start the zend CVS tree
|
||||
*
|
||||
* Revision 1.1 1998/08/12 09:29:16 steinm
|
||||
* First version of Hyperwave module.
|
||||
*
|
||||
* Revision 1.5 91/12/31 19:39:49 kjb
|
||||
* Modified include file directories.
|
||||
*
|
||||
* Revision 1.4 91/10/28 03:16:39 kjb
|
||||
* Ported to the Iris.
|
||||
*
|
||||
* Revision 1.3 91/09/27 03:09:18 kjb
|
||||
* Cosmetic change.
|
||||
*
|
||||
* Revision 1.2 91/09/03 18:27:42 ROOT_DOS
|
||||
* Ported to UNIX.
|
||||
*
|
||||
* Revision 1.1 91/09/01 18:35:23 ROOT_DOS
|
||||
* Initial revision
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MSVC5
|
||||
#include "php_config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include "dlist.h"
|
||||
|
||||
#define PUBLIC
|
||||
#define PRIVATE static
|
||||
|
||||
PUBLIC void *dlst_newnode(int size)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_newnode
|
||||
* Parameters: size - Amount of memory to allocate for node
|
||||
* Returns: Pointer to the allocated node's user space.
|
||||
*
|
||||
* Description: Allocates the memory required for a node, adding a small
|
||||
* header at the start of the node. We return a reference to
|
||||
* the user space of the node, as if it had been allocated via
|
||||
* malloc().
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *node;
|
||||
|
||||
if ( !(node = (PHP_DLST_BUCKET*)malloc(size + sizeof(PHP_DLST_BUCKET))) ) {
|
||||
fprintf(stderr,"Not enough memory to allocate list node.\n");
|
||||
/* raise(SIGABRT);*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return PHP_DLST_USERSPACE(node); /* Return pointer to user space */
|
||||
}
|
||||
|
||||
PUBLIC void dlst_freenode(void *node)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_freenode
|
||||
* Parameters: node - Node to free.
|
||||
*
|
||||
* Description: Frees a node previously allocated with lst_newnode().
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
free(PHP_DLST_HEADER(node));
|
||||
}
|
||||
|
||||
PUBLIC DLIST *dlst_init(void)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_init
|
||||
* Returns: Pointer to a newly created list.
|
||||
*
|
||||
* Description: Initialises a list and returns a pointer to it.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
DLIST *l;
|
||||
|
||||
if ((l = (DLIST*)malloc(sizeof(DLIST))) != NULL) {
|
||||
l->count = 0;
|
||||
l->head = &(l->hz[0]);
|
||||
l->z = &(l->hz[1]);
|
||||
l->head->next = l->z->next = l->z;
|
||||
l->z->prev = l->head->prev = l->head;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"Insufficient memory to allocate list\n");
|
||||
/*raise(SIGABRT);*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
PUBLIC void dlst_kill(DLIST *l,void (*freeNode)(void *node))
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_kill
|
||||
* Parameters: l - List to kill
|
||||
* freeNode - Pointer to user routine to free a node
|
||||
*
|
||||
* Description: Kills the list l, by deleting all of the elements contained
|
||||
* within the list one by one and then deleting the list
|
||||
* itself. Note that we call the user supplied routine
|
||||
* (*freeNode)() to free each list node. This allows the user
|
||||
* program to perform any extra processing needed to kill each
|
||||
* node (if each node contains pointers to other items on the
|
||||
* heap for example). If no extra processing is required, just
|
||||
* pass the address of dlst_freenode(), ie:
|
||||
*
|
||||
* dlst_kill(myList,dlst_freenode);
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n,*p;
|
||||
|
||||
n = l->head->next;
|
||||
while (n != l->z) { /* Free all nodes in list */
|
||||
p = n;
|
||||
n = n->next;
|
||||
(*freeNode)(PHP_DLST_USERSPACE(p));
|
||||
}
|
||||
free(l); /* Free the list itself */
|
||||
}
|
||||
|
||||
PUBLIC void dlst_insertafter(DLIST *l,void *node,void *after)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: lst_insertafter
|
||||
* Parameters: l - List to insert node into
|
||||
* node - Pointer to user space of node to insert
|
||||
* after - Pointer to user space of node to insert node after
|
||||
*
|
||||
* Description: Inserts a new node into the list after the node 'after'. To
|
||||
* insert a new node at the beginning of the list, user the
|
||||
* macro PHP_DLST_HEAD in place of 'after'. ie:
|
||||
*
|
||||
* dlst_insertafter(mylist,node,PHP_DLST_HEAD(mylist));
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(node),*a = PHP_DLST_HEADER(after);
|
||||
|
||||
n->next = a->next;
|
||||
a->next = n;
|
||||
n->prev = a;
|
||||
n->next->prev = n;
|
||||
l->count++;
|
||||
}
|
||||
|
||||
PUBLIC void *dlst_deletenext(DLIST *l,void *node)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: lst_deletenext
|
||||
* Parameters: l - List to delete node from.
|
||||
* node - Node to delete the next node from
|
||||
* Returns: Pointer to the deleted node's userspace.
|
||||
*
|
||||
* Description: Removes the node AFTER 'node' from the list l.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(node);
|
||||
|
||||
node = PHP_DLST_USERSPACE(n->next);
|
||||
n->next->next->prev = n;
|
||||
n->next = n->next->next;
|
||||
l->count--;
|
||||
return node;
|
||||
}
|
||||
|
||||
PUBLIC void *dlst_first(DLIST *l)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_first
|
||||
* Parameters: l - List to obtain first node from
|
||||
* Returns: Pointer to first node in list, NULL if list is empty.
|
||||
*
|
||||
* Description: Returns a pointer to the user space of the first node in
|
||||
* the list. If the list is empty, we return NULL.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n;
|
||||
|
||||
n = l->head->next;
|
||||
return (n == l->z ? NULL : PHP_DLST_USERSPACE(n));
|
||||
}
|
||||
|
||||
PUBLIC void *dlst_last(DLIST *l)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_last
|
||||
* Parameters: l - List to obtain last node from
|
||||
* Returns: Pointer to last node in list, NULL if list is empty.
|
||||
*
|
||||
* Description: Returns a pointer to the user space of the last node in
|
||||
* the list. If the list is empty, we return NULL.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n;
|
||||
|
||||
n = l->z->prev;
|
||||
return (n == l->head ? NULL : PHP_DLST_USERSPACE(n));
|
||||
}
|
||||
|
||||
PUBLIC void *dlst_next(void *prev)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_next
|
||||
* Parameters: prev - Previous node in list to obtain next node from
|
||||
* Returns: Pointer to the next node in the list, NULL at end of list.
|
||||
*
|
||||
* Description: Returns a pointer to the user space of the next node in the
|
||||
* list given a pointer to the user space of the previous node.
|
||||
* If we have reached the end of the list, we return NULL. The
|
||||
* end of the list is detected when the next pointer of a node
|
||||
* points back to itself, as does the dummy last node's next
|
||||
* pointer. This enables us to detect the end of the list
|
||||
* without needed access to the list data structure itself.
|
||||
*
|
||||
* NOTE: We do no checking to ensure that 'prev' is NOT a
|
||||
* NULL pointer.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(prev);
|
||||
|
||||
n = n->next;
|
||||
return (n == n->next ? NULL : PHP_DLST_USERSPACE(n));
|
||||
}
|
||||
|
||||
PUBLIC void *dlst_prev(void *next)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_prev
|
||||
* Parameters: next - Next node in list to obtain previous node from
|
||||
* Returns: Pointer to the previous node in the list, NULL at start list.
|
||||
*
|
||||
* Description: Returns a pointer to the user space of the prev node in the
|
||||
* list given a pointer to the user space of the next node.
|
||||
* If we have reached the start of the list, we return NULL. The
|
||||
* start of the list is detected when the prev pointer of a node
|
||||
* points back to itself, as does the dummy head node's prev
|
||||
* pointer. This enables us to detect the start of the list
|
||||
* without needed access to the list data structure itself.
|
||||
*
|
||||
* NOTE: We do no checking to ensure that 'next' is NOT a
|
||||
* NULL pointer.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(next);
|
||||
|
||||
n = n->prev;
|
||||
return (n == n->prev ? NULL : PHP_DLST_USERSPACE(n));
|
||||
}
|
||||
|
||||
/* Static globals required by merge() */
|
||||
|
||||
static PHP_DLST_BUCKET *z;
|
||||
static int (*cmp)(void*,void*);
|
||||
|
||||
PRIVATE PHP_DLST_BUCKET *merge(PHP_DLST_BUCKET *a,PHP_DLST_BUCKET *b,PHP_DLST_BUCKET **end)
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: merge
|
||||
* Parameters: a,b - Sublist's to merge
|
||||
* Returns: Pointer to the merged sublists.
|
||||
*
|
||||
* Description: Merges two sorted lists of nodes together into a single
|
||||
* sorted list.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
PHP_DLST_BUCKET *c;
|
||||
|
||||
/* Go through the lists, merging them together in sorted order */
|
||||
|
||||
c = z;
|
||||
while (a != z && b != z) {
|
||||
if ((*cmp)(PHP_DLST_USERSPACE(a),PHP_DLST_USERSPACE(b)) <= 0) {
|
||||
c->next = a; c = a; a = a->next;
|
||||
}
|
||||
else {
|
||||
c->next = b; c = b; b = b->next;
|
||||
}
|
||||
};
|
||||
|
||||
/* If one of the lists is not exhausted, then re-attach it to the end
|
||||
* of the newly merged list
|
||||
*/
|
||||
|
||||
if (a != z) c->next = a;
|
||||
if (b != z) c->next = b;
|
||||
|
||||
/* Set *end to point to the end of the newly merged list */
|
||||
|
||||
while (c->next != z) c = c->next;
|
||||
*end = c;
|
||||
|
||||
/* Determine the start of the merged lists, and reset z to point to
|
||||
* itself
|
||||
*/
|
||||
|
||||
c = z->next; z->next = z;
|
||||
return c;
|
||||
}
|
||||
|
||||
PUBLIC void dlst_mergesort(DLIST *l,int (*cmp_func)(void*,void*))
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: dlst_mergesort
|
||||
* Parameters: l - List to merge sort
|
||||
* cmp_func - Function to compare two user spaces
|
||||
*
|
||||
* Description: Mergesort's all the nodes in the list. 'cmp' must point to
|
||||
* a comparison function that can compare the user spaces of
|
||||
* two different nodes. 'cmp' should work the same as
|
||||
* strcmp(), in terms of the values it returns. Rather than
|
||||
* waste processing time keeping the previous pointers up to
|
||||
* date while performing the mergesort, we simply run through
|
||||
* the list at the end of the sort to fix the previous pointers.
|
||||
*
|
||||
****************************************************************************/
|
||||
{
|
||||
int i,N;
|
||||
PHP_DLST_BUCKET *a,*b; /* Pointers to sublists to merge */
|
||||
PHP_DLST_BUCKET *c; /* Pointer to end of sorted sublists */
|
||||
PHP_DLST_BUCKET *head; /* Pointer to dummy head node for list */
|
||||
PHP_DLST_BUCKET *todo; /* Pointer to sublists yet to be sorted */
|
||||
PHP_DLST_BUCKET *t; /* Temporary */
|
||||
|
||||
/* Set up globals required by merge() and pointer to head */
|
||||
|
||||
z = l->z; cmp = cmp_func; head = l->head;
|
||||
|
||||
for (N = 1,a = z; a != head->next; N = N + N) {
|
||||
todo = head->next; c = head;
|
||||
while (todo != z) {
|
||||
|
||||
/* Build first sublist to be merged, and splice from main list
|
||||
*/
|
||||
|
||||
a = t = todo;
|
||||
for (i = 1; i < N; i++) t = t->next;
|
||||
b = t->next; t->next = z; t = b;
|
||||
|
||||
/* Build second sublist to be merged and splice from main list
|
||||
*/
|
||||
|
||||
for (i = 1; i < N; i++) t = t->next;
|
||||
todo = t->next; t->next = z;
|
||||
|
||||
/* Merge the two sublists created, and set 'c' to point to the
|
||||
* end of the newly merged sublists.
|
||||
*/
|
||||
|
||||
c->next = merge(a,b,&t); c = t;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix the previous pointers for the list */
|
||||
|
||||
a = b = l->head;
|
||||
b = b->next;
|
||||
while (1) {
|
||||
b->prev = a;
|
||||
if (b == z)
|
||||
break;
|
||||
a = a->next;
|
||||
b = b->next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 1991 Kendall Bennett.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Filename: $RCSfile$
|
||||
* Version: $Revision$
|
||||
*
|
||||
* Language: ANSI C
|
||||
* Environment: any
|
||||
*
|
||||
* Description: Header file for doubly linked list routines.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Revision History:
|
||||
* -----------------
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 1999/04/21 23:11:20 ssb
|
||||
* moved apache, com and hyperwave into ext/
|
||||
*
|
||||
* Revision 1.1.1.1 1999/04/07 21:03:20 zeev
|
||||
* PHP 4.0
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/17 04:29:11 andi
|
||||
* PHP4
|
||||
*
|
||||
* Revision 1.1.1.1 1998/12/21 07:56:22 andi
|
||||
* Trying to start the zend CVS tree
|
||||
*
|
||||
* Revision 1.2 1998/08/14 15:51:12 shane
|
||||
* Some work on getting hyperwave to work on windows. hg_comm needs a lot of work.
|
||||
*
|
||||
* Mainly, signals, fnctl, bzero, bcopy, etc are not portable functions. Most of this
|
||||
* will have to be rewriten for windows.
|
||||
*
|
||||
* Revision 1.1 1998/08/12 09:29:16 steinm
|
||||
* First version of Hyperwave module.
|
||||
*
|
||||
* Revision 1.5 91/12/31 19:40:54 kjb
|
||||
*
|
||||
* Modified include files directories.
|
||||
*
|
||||
* Revision 1.4 91/09/27 03:10:41 kjb
|
||||
* Added compatibility with C++.
|
||||
*
|
||||
* Revision 1.3 91/09/26 10:07:16 kjb
|
||||
* Took out extern references
|
||||
*
|
||||
* Revision 1.2 91/09/01 19:37:20 ROOT_DOS
|
||||
* Changed DLST_TAIL macro so that it returns a pointer to the REAL last
|
||||
* node of the list, not the dummy last node (l->z).
|
||||
*
|
||||
* Revision 1.1 91/09/01 18:38:23 ROOT_DOS
|
||||
* Initial revision
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __DLIST_H
|
||||
#define __DLIST_H
|
||||
|
||||
#ifndef __DEBUG_H
|
||||
/*#include "debug.h"*/
|
||||
#endif
|
||||
|
||||
/*---------------------- Macros and type definitions ----------------------*/
|
||||
|
||||
typedef struct PHP_DLST_BUCKET {
|
||||
struct PHP_DLST_BUCKET *next;
|
||||
struct PHP_DLST_BUCKET *prev;
|
||||
} PHP_DLST_BUCKET;
|
||||
|
||||
/* necessary for AIX 4.2.x */
|
||||
|
||||
#ifdef hz
|
||||
#undef hz
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int count; /* Number of elements currently in list */
|
||||
PHP_DLST_BUCKET *head; /* Pointer to head element of list */
|
||||
PHP_DLST_BUCKET *z; /* Pointer to last node of list */
|
||||
PHP_DLST_BUCKET hz[2]; /* Space for head and z nodes */
|
||||
} DLIST;
|
||||
|
||||
/* Return a pointer to the user space given the address of the header of
|
||||
* a node.
|
||||
*/
|
||||
|
||||
#define PHP_DLST_USERSPACE(h) ((void*)((PHP_DLST_BUCKET*)(h) + 1))
|
||||
|
||||
/* Return a pointer to the header of a node, given the address of the
|
||||
* user space.
|
||||
*/
|
||||
|
||||
#define PHP_DLST_HEADER(n) ((PHP_DLST_BUCKET*)(n) - 1)
|
||||
|
||||
/* Return a pointer to the user space of the list's head node. This user
|
||||
* space does not actually exist, but it is useful to be able to address
|
||||
* it to enable insertion at the start of the list.
|
||||
*/
|
||||
|
||||
#define PHP_DLST_HEAD(l) PHP_DLST_USERSPACE((l)->head)
|
||||
|
||||
/* Return a pointer to the user space of the last node in list. */
|
||||
|
||||
#define PHP_DLST_TAIL(l) PHP_DLST_USERSPACE((l)->z->prev)
|
||||
|
||||
/* Determine if a list is empty
|
||||
*/
|
||||
|
||||
#define PHP_DLST_EMPTY(l) ((l)->count == 0)
|
||||
|
||||
/*-------------------------- Function Prototypes --------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void *dlst_newnode(int size);
|
||||
void dlst_freenode(void *node);
|
||||
DLIST *dlst_init(void);
|
||||
void dlst_kill(DLIST *l,void (*freeNode)(void *node));
|
||||
void dlst_insertafter(DLIST *l,void *node,void *after);
|
||||
void *dlst_deletenext(DLIST *l,void *node);
|
||||
void *dlst_first(DLIST *l);
|
||||
void *dlst_last(DLIST *l);
|
||||
void *dlst_next(void *prev);
|
||||
void *dlst_prev(void *next);
|
||||
void dlst_mergesort(DLIST *l,int (*cmp_func)(void*,void*));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN(LIB_SHARED_CONVENIENCE,[
|
||||
lib_target="\$(LTLIBRARY_NAME)"
|
||||
cat >>$1<<EOF
|
||||
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
@@ -14,7 +14,7 @@ AC_DEFUN(LIB_SHARED_MODULE,[
|
||||
lib_target="\$(LTLIBRARY_SHARED_NAME)"
|
||||
cat >>$1<<EOF
|
||||
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
|
||||
|
||||
EOF
|
||||
@@ -35,9 +35,9 @@ AC_DEFUN(LIB_BUILD,[
|
||||
lib_makefile="$1/libs.mk"
|
||||
lib_target=""
|
||||
|
||||
test -d $1 || $php_shtool mkdir -p $1
|
||||
$php_shtool mkdir -p $1
|
||||
cat >$lib_makefile<<EOF
|
||||
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
|
||||
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
|
||||
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
|
||||
EOF
|
||||
|
||||
|
||||
+8
-8
@@ -4,10 +4,10 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_01.txt. |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if defined(COMPILE_DL) || defined(COMPILE_DL_ASPELL)
|
||||
#ifdef COMPILE_DL_ASPELL
|
||||
#include "phpdl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
@@ -48,7 +48,7 @@ zend_module_entry aspell_module_entry = {
|
||||
};
|
||||
|
||||
|
||||
#if defined(COMPILE_DL) || defined(COMPILE_DL_ASPELL)
|
||||
#ifdef COMPILE_DL_ASPELL
|
||||
ZEND_GET_MODULE(aspell)
|
||||
#endif
|
||||
|
||||
@@ -74,7 +74,7 @@ PHP_FUNCTION(aspell_new)
|
||||
aspell *sc;
|
||||
int ind;
|
||||
|
||||
argc = ARG_COUNT(ht);
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc,&master,&personal) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ PHP_FUNCTION(aspell_suggest)
|
||||
size_t i;
|
||||
|
||||
|
||||
argc = ARG_COUNT(ht);
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ PHP_FUNCTION(aspell_check)
|
||||
aspell *sc;
|
||||
|
||||
int argc;
|
||||
argc = ARG_COUNT(ht);
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ PHP_FUNCTION(aspell_check_raw)
|
||||
int argc;
|
||||
aspell *sc;
|
||||
|
||||
argc = ARG_COUNT(ht);
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
+13
-25
@@ -1,37 +1,25 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP HTML Embedded Scripting Language Version 3.0 |
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This program is free software; you can redistribute it and/or modify |
|
||||
| it under the terms of one of the following licenses: |
|
||||
| |
|
||||
| A) the GNU General Public License as published by the Free Software |
|
||||
| Foundation; either version 2 of the License, or (at your option) |
|
||||
| any later version. |
|
||||
| |
|
||||
| B) the PHP License as published by the PHP Development Team and |
|
||||
| included in the distribution in the file: LICENSE |
|
||||
| |
|
||||
| This program is distributed in the hope that it will be useful, |
|
||||
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
| GNU General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of both licenses referred to here. |
|
||||
| If you did not, or have any questions about PHP licensing, please |
|
||||
| contact core@php.net. |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef _ASPELL_H
|
||||
#define _ASPELL_H
|
||||
#ifndef PHP_ASPELL_H
|
||||
#define PHP_ASPELL_H
|
||||
#if HAVE_ASPELL
|
||||
extern zend_module_entry aspell_module_entry;
|
||||
#define aspell_module_ptr &aspell_module_entry
|
||||
@@ -50,4 +38,4 @@ PHP_FUNCTION(aspell_suggest);
|
||||
|
||||
#define phpext_aspell_ptr aspell_module_ptr
|
||||
|
||||
#endif /* _ASPELL_H */
|
||||
#endif /* PHP_ASPELL_H */
|
||||
+15
-13
@@ -4,17 +4,19 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_01.txt. |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include "php.h"
|
||||
|
||||
@@ -40,7 +42,7 @@ zend_module_entry bcmath_module_entry = {
|
||||
"bcmath", bcmath_functions, NULL, NULL, PHP_RINIT(bcmath), PHP_RSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#if defined(COMPILE_DL) || defined(COMPILE_DL_BCMATH)
|
||||
#ifdef COMPILE_DL_BCMATH
|
||||
ZEND_GET_MODULE(bcmath)
|
||||
#endif
|
||||
|
||||
@@ -71,7 +73,7 @@ PHP_FUNCTION(bcadd)
|
||||
bc_num first, second, result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -114,7 +116,7 @@ PHP_FUNCTION(bcsub)
|
||||
bc_num first, second, result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -157,7 +159,7 @@ PHP_FUNCTION(bcmul)
|
||||
bc_num first, second, result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -200,7 +202,7 @@ PHP_FUNCTION(bcdiv)
|
||||
bc_num first, second, result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -248,7 +250,7 @@ PHP_FUNCTION(bcmod)
|
||||
pval **left, **right;
|
||||
bc_num first, second, result;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -290,7 +292,7 @@ PHP_FUNCTION(bcpow)
|
||||
bc_num first, second, result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -333,7 +335,7 @@ PHP_FUNCTION(bcsqrt)
|
||||
bc_num result;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 1:
|
||||
if (zend_get_parameters_ex(1, &left)== FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -373,7 +375,7 @@ PHP_FUNCTION(bccomp)
|
||||
bc_num first, second;
|
||||
int scale=bc_precision;
|
||||
|
||||
switch (ARG_COUNT(ht)) {
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -413,7 +415,7 @@ PHP_FUNCTION(bcscale)
|
||||
{
|
||||
pval **new_scale;
|
||||
|
||||
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
|
||||
+13
-30
@@ -1,42 +1,25 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP HTML Embedded Scripting Language Version 3.0 |
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This program is free software; you can redistribute it and/or modify |
|
||||
| it under the terms of one of the following licenses: |
|
||||
| |
|
||||
| A) the GNU General Public License as published by the Free Software |
|
||||
| Foundation; either version 2 of the License, or (at your option) |
|
||||
| any later version. |
|
||||
| |
|
||||
| B) the PHP License as published by the PHP Development Team and |
|
||||
| included in the distribution in the file: LICENSE |
|
||||
| |
|
||||
| This program is distributed in the hope that it will be useful, |
|
||||
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
| GNU General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of both licenses referred to here. |
|
||||
| If you did not, or have any questions about PHP licensing, please |
|
||||
| contact core@php.net. |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef _PHP_BCMATH_H
|
||||
#define _PHP_BCMATH_H
|
||||
|
||||
#if COMPILE_DL
|
||||
#undef WITH_BCMATH
|
||||
#define WITH_BCMATH 1
|
||||
#endif
|
||||
#ifndef PHP_BCMATH_H
|
||||
#define PHP_BCMATH_H
|
||||
|
||||
#if WITH_BCMATH
|
||||
|
||||
@@ -61,4 +44,4 @@ PHP_FUNCTION(bcscale);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _PHP_BCMATH_H */
|
||||
#endif /* PHP_BCMATH_H */
|
||||
@@ -4,10 +4,10 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_01.txt. |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -32,7 +32,7 @@ PHP_FUNCTION(unixtojd)
|
||||
long jdate;
|
||||
time_t t;
|
||||
struct tm *ta, tmbuf;
|
||||
int myargc=ARG_COUNT(ht);
|
||||
int myargc=ZEND_NUM_ARGS();
|
||||
|
||||
if ((myargc > 1) || (zend_get_parameters(ht,myargc, ×tamp) != SUCCESS)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -59,7 +59,7 @@ PHP_FUNCTION(jdtounix)
|
||||
pval *jday;
|
||||
long uday;
|
||||
|
||||
if ((ARG_COUNT(ht)!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
|
||||
if ((ZEND_NUM_ARGS()!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_01.txt. |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -249,7 +249,7 @@ PHP_FUNCTION(jdtogregorian)
|
||||
pval *julday, *mode;
|
||||
int day;
|
||||
char *daynamel, *daynames;
|
||||
int myargc=ARG_COUNT(ht),mymode=0;
|
||||
int myargc=ZEND_NUM_ARGS(),mymode=0;
|
||||
|
||||
if ((myargc < 1) || (myargc > 2) || (zend_get_parameters(ht,myargc, &julday, &mode) != SUCCESS)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
@@ -43,8 +43,8 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL" /D ZTS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D ZEND_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
@@ -70,8 +70,8 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL" /D ZTS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D ZEND_DEBUG=1 /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_01.txt. |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -34,7 +34,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
|
||||
time_t the_time;
|
||||
long year, golden, solar, lunar, pfm, dom, tmp, easter;
|
||||
|
||||
switch(ARG_COUNT(ht)) {
|
||||
switch(ZEND_NUM_ARGS()) {
|
||||
case 0:
|
||||
the_time = time(NULL);
|
||||
ta = localtime(&the_time);
|
||||
|
||||
Loaded 100 of 619 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user