mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 12:10:50 +00:00
Compare commits
555
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a286e992fd | ||
|
|
6118b0b738 | ||
|
|
2fe662392a | ||
|
|
7a48dfb28e | ||
|
|
67bf61b087 | ||
|
|
e3d3eaddf1 | ||
|
|
c4bf1f8f65 | ||
|
|
e1d1c8d901 | ||
|
|
805a596542 | ||
|
|
5663cf0e81 | ||
|
|
a14f4684a1 | ||
|
|
1b12c6b362 | ||
|
|
cb49e8b1ce | ||
|
|
d2928e0af0 | ||
|
|
f3396e9ef2 | ||
|
|
a613be3e96 | ||
|
|
8cdc2fec19 | ||
|
|
c9b44080d2 | ||
|
|
5c8567e212 | ||
|
|
d56d1de230 | ||
|
|
6a12eef216 | ||
|
|
0a4ced10ed | ||
|
|
7d48c9c32d | ||
|
|
b2a62cf620 | ||
|
|
91f51b34d4 | ||
|
|
2748841db5 | ||
|
|
921d5d6a30 | ||
|
|
77687e57bf | ||
|
|
a8ec99c299 | ||
|
|
e2fccffa2d | ||
|
|
1a429389b7 | ||
|
|
0f8e764685 | ||
|
|
d6416633d2 | ||
|
|
296b11c9fb | ||
|
|
c091e91140 | ||
|
|
fe15677f4e | ||
|
|
fe86da56e8 | ||
|
|
1442b416a8 | ||
|
|
6b4bd35d11 | ||
|
|
a7f8fb3461 | ||
|
|
582697ae5c | ||
|
|
811b268fb1 | ||
|
|
43c40d602b | ||
|
|
3e4ea8305d | ||
|
|
37485d4d38 | ||
|
|
756018250f | ||
|
|
af5c1b862d | ||
|
|
0660599ae2 | ||
|
|
e13089d1da | ||
|
|
20251c4f37 | ||
|
|
8108a04110 | ||
|
|
09cdac3d98 | ||
|
|
27586a947a | ||
|
|
6368b9fc66 | ||
|
|
bedb66ba33 | ||
|
|
7394b3734b | ||
|
|
8c9a6e1436 | ||
|
|
65a055397f | ||
|
|
d415b23ff6 | ||
|
|
416122f885 | ||
|
|
256d015dd5 | ||
|
|
7e9d0f7898 | ||
|
|
b5937e49d8 | ||
|
|
b5e227d4c5 | ||
|
|
a105687232 | ||
|
|
b9a9d572d8 | ||
|
|
5b9ce68207 | ||
|
|
98f0b33836 | ||
|
|
74a947383f | ||
|
|
084e58fa8b | ||
|
|
07bcc295c4 | ||
|
|
5b80f925cf | ||
|
|
008173f899 | ||
|
|
37d8de4ba6 | ||
|
|
7256d2ca6a | ||
|
|
c8df0dcb0a | ||
|
|
e8c97542bf | ||
|
|
33a4feed28 | ||
|
|
776ebe8f1f | ||
|
|
3fc55e77e6 | ||
|
|
a012d5a5dc | ||
|
|
da3d88851d | ||
|
|
3e52976f30 | ||
|
|
4d93757dca | ||
|
|
b56adc718b | ||
|
|
36adf916d9 | ||
|
|
3f5f747d90 | ||
|
|
ae82f51fc0 | ||
|
|
bfb55aa96d | ||
|
|
fbd2655dff | ||
|
|
bbef4e8da2 | ||
|
|
250543afc9 | ||
|
|
553245e48d | ||
|
|
94d9d3f920 | ||
|
|
1ace2e5ac7 | ||
|
|
047f1a26a0 | ||
|
|
a8aaf58df3 | ||
|
|
3d7b5b792e | ||
|
|
ad6e24cfb1 | ||
|
|
f10ce39b79 | ||
|
|
f487c128cc | ||
|
|
62ee4aa49f | ||
|
|
a62134d159 | ||
|
|
c883ae3d1f | ||
|
|
84bd08261f | ||
|
|
c216440f1c | ||
|
|
f3bc8a341b | ||
|
|
8d1c55499d | ||
|
|
49afbfac4a | ||
|
|
bd07142b91 | ||
|
|
6cd2919f3d | ||
|
|
a90af34542 | ||
|
|
b8e9edcce3 | ||
|
|
bcc8aad178 | ||
|
|
8993ccd75c | ||
|
|
5ee2605386 | ||
|
|
1a45dcf5ea | ||
|
|
8c142dd228 | ||
|
|
3ba37514df | ||
|
|
d7cc37874c | ||
|
|
c07ee38ff3 | ||
|
|
5f2280e9f8 | ||
|
|
56adfe1f3c | ||
|
|
a39d2b5747 | ||
|
|
a2b38741a1 | ||
|
|
5cc18c9967 | ||
|
|
9b4400830f | ||
|
|
916806055c | ||
|
|
25203ef3bc | ||
|
|
ba31cb7b88 | ||
|
|
f3ffd7b3f9 | ||
|
|
274e37db02 | ||
|
|
1ecb6ccd16 | ||
|
|
5be2acc65d | ||
|
|
ffbe3b0816 | ||
|
|
d74acc15cc | ||
|
|
437786b115 | ||
|
|
f262d06686 | ||
|
|
0d7b5257a8 | ||
|
|
1d9846b54a | ||
|
|
5d694d0474 | ||
|
|
0d144466a8 | ||
|
|
e6dad2a5c3 | ||
|
|
e862541306 | ||
|
|
d0b22dc5c8 | ||
|
|
5fa9eaca9a | ||
|
|
10b6108ac1 | ||
|
|
b350e15f3c | ||
|
|
8392ed2358 | ||
|
|
e1d798465b | ||
|
|
63244c0e3d | ||
|
|
54f777ef1c | ||
|
|
af6894dc7b | ||
|
|
885d8e8733 | ||
|
|
a326342b93 | ||
|
|
4b550d43ef | ||
|
|
e522104f1d | ||
|
|
71121a02b1 | ||
|
|
13ea8afdc5 | ||
|
|
d2f43d60f9 | ||
|
|
a922fbb89c | ||
|
|
8ae159da78 | ||
|
|
ab90623f49 | ||
|
|
7e81e9619e | ||
|
|
be5e7382ef | ||
|
|
cebd47134a | ||
|
|
b20bb1137b | ||
|
|
2cdf30c490 | ||
|
|
e6e21db0a8 | ||
|
|
aeaba53b0b | ||
|
|
b103d7ba75 | ||
|
|
233bb83463 | ||
|
|
938859d87c | ||
|
|
9045591353 | ||
|
|
f2d8033436 | ||
|
|
de74e9b003 | ||
|
|
96abb7e0a5 | ||
|
|
6e529c486a | ||
|
|
459631d679 | ||
|
|
f468d909a1 | ||
|
|
cfe99e0e98 | ||
|
|
11fb10b74d | ||
|
|
77d0be75a8 | ||
|
|
905505d0f0 | ||
|
|
59146cb2b8 | ||
|
|
24e352a0fd | ||
|
|
b935312966 | ||
|
|
4b0d2f3b71 | ||
|
|
05e84a25aa | ||
|
|
04e8936f21 | ||
|
|
f4f090ccbe | ||
|
|
ceca9448a9 | ||
|
|
3308133d4a | ||
|
|
e9d101a685 | ||
|
|
908e2c4650 | ||
|
|
547796ae72 | ||
|
|
54a9f3cb5b | ||
|
|
07d3b15863 | ||
|
|
a9f320390e | ||
|
|
435e835bbf | ||
|
|
d47d7e20ef | ||
|
|
8231031995 | ||
|
|
b4360b0aba | ||
|
|
fbe6a29b11 | ||
|
|
a7c628ef33 | ||
|
|
051997039a | ||
|
|
3e3f10efbb | ||
|
|
c298ea82ca | ||
|
|
8190860776 | ||
|
|
40aa1c6e73 | ||
|
|
f06bb200e5 | ||
|
|
d9fb0a4da5 | ||
|
|
44186c14a4 | ||
|
|
c17a1a7645 | ||
|
|
34af036d8e | ||
|
|
10af23e641 | ||
|
|
2211aac68f | ||
|
|
b75c100dc6 | ||
|
|
349c0cc61c | ||
|
|
e7df907a10 | ||
|
|
a7d70ccebf | ||
|
|
419a87ddd8 | ||
|
|
4e502a7fc2 | ||
|
|
b31a857c83 | ||
|
|
5e759d980e | ||
|
|
09d4b25070 | ||
|
|
8054e6d951 | ||
|
|
54b442330c | ||
|
|
324ea3636d | ||
|
|
61967a0318 | ||
|
|
4bb461b3d5 | ||
|
|
1c840f70e2 | ||
|
|
fd1125627a | ||
|
|
3b6bf6ab58 | ||
|
|
15531b60fc | ||
|
|
c8dfe73903 | ||
|
|
9acc7d2fd8 | ||
|
|
d217efa8b6 | ||
|
|
64a60d5d70 | ||
|
|
2b321fb6ed | ||
|
|
2e680913da | ||
|
|
beb6c638d9 | ||
|
|
0955c58d8e | ||
|
|
0b5a97681a | ||
|
|
0c607c2ecd | ||
|
|
cda9aeba03 | ||
|
|
d01de96f9a | ||
|
|
0542a6f2c2 | ||
|
|
7c5e901f4d | ||
|
|
6f475c1ce6 | ||
|
|
5bdea6fa79 | ||
|
|
04a262ffe2 | ||
|
|
2ab994fe0c | ||
|
|
85cab5a838 | ||
|
|
9d44f00a6d | ||
|
|
e05a7a90c9 | ||
|
|
ae9dcb1799 | ||
|
|
82a60c6538 | ||
|
|
870c5434fe | ||
|
|
94be5fd002 | ||
|
|
d231b908a1 | ||
|
|
b25e990ffd | ||
|
|
6b46618a76 | ||
|
|
b3726eb497 | ||
|
|
eae934a6b7 | ||
|
|
5bf33a2e83 | ||
|
|
2cb6431c2f | ||
|
|
17d094d5bb | ||
|
|
79f25b32a1 | ||
|
|
e8cbe865f3 | ||
|
|
f01a236c09 | ||
|
|
3bee739456 | ||
|
|
126cd77070 | ||
|
|
c3bd38ba9b | ||
|
|
f42d1090bb | ||
|
|
33372e4d5d | ||
|
|
b7fe870f06 | ||
|
|
22251bfa5b | ||
|
|
54ec8b914f | ||
|
|
aa9bfc06e7 | ||
|
|
4e1e2eadec | ||
|
|
4f45d300fb | ||
|
|
8a7c2ff618 | ||
|
|
322d1e5439 | ||
|
|
10f83680b0 | ||
|
|
8abcdde864 | ||
|
|
83a37cefc1 | ||
|
|
d49832983a | ||
|
|
4835d49c86 | ||
|
|
4337c68030 | ||
|
|
e06e987eb4 | ||
|
|
9819666a00 | ||
|
|
384625408b | ||
|
|
4baa8ee0bc | ||
|
|
6aa5793baf | ||
|
|
5dff4e8e40 | ||
|
|
26d147a798 | ||
|
|
d24c272e50 | ||
|
|
e48794e58b | ||
|
|
418c15ef14 | ||
|
|
37ebffee0c | ||
|
|
4acc981ac4 | ||
|
|
bdd787626d | ||
|
|
3250e630a3 | ||
|
|
2b3b798d7d | ||
|
|
e8812b2845 | ||
|
|
516c2aa7da | ||
|
|
8126952c99 | ||
|
|
b290efa0d3 | ||
|
|
e53ed77075 | ||
|
|
906b0b4235 | ||
|
|
d7852a4930 | ||
|
|
2d701541b4 | ||
|
|
f5f0390dbf | ||
|
|
86b2558a5e | ||
|
|
b539bb6a07 | ||
|
|
5e496cc0e7 | ||
|
|
35514292fe | ||
|
|
a402f5e87e | ||
|
|
da481f3189 | ||
|
|
5adf49c135 | ||
|
|
8d54c95ef7 | ||
|
|
1a88427263 | ||
|
|
3259aad229 | ||
|
|
43765f49f7 | ||
|
|
a5b1ec723d | ||
|
|
4e01e392ff | ||
|
|
f744272c52 | ||
|
|
ce647ba16a | ||
|
|
a8bdff6998 | ||
|
|
8b987b185f | ||
|
|
607b7b35e5 | ||
|
|
8235ce2f20 | ||
|
|
ac7c553f0d | ||
|
|
eb54f96a0b | ||
|
|
e7ecd526c5 | ||
|
|
3161e32a9f | ||
|
|
ba2f3ac0e6 | ||
|
|
ee1569d310 | ||
|
|
b386cdbdd7 | ||
|
|
f61068721b | ||
|
|
b1aaab7355 | ||
|
|
6cddc39be1 | ||
|
|
0bd88170f5 | ||
|
|
ef9d20d638 | ||
|
|
d77a14814f | ||
|
|
5fe94dfb5e | ||
|
|
75e9fd0909 | ||
|
|
f7f3d1c31e | ||
|
|
1d9e3a760d | ||
|
|
f0208d3afa | ||
|
|
cb9873f4a4 | ||
|
|
1778b00928 | ||
|
|
c92a084e39 | ||
|
|
b689d32d18 | ||
|
|
367868fa7e | ||
|
|
94d4fb4249 | ||
|
|
aabd63044c | ||
|
|
c1b0b3781f | ||
|
|
a2aedfdf00 | ||
|
|
ed4ddfe263 | ||
|
|
0f3cce53ad | ||
|
|
6880dcb0d4 | ||
|
|
1842fc7a42 | ||
|
|
7ffde39f44 | ||
|
|
99dd5c22d1 | ||
|
|
0a919c89da | ||
|
|
1a27ca62a8 | ||
|
|
235f05dafd | ||
|
|
ae366c348a | ||
|
|
203981a031 | ||
|
|
8efade7894 | ||
|
|
e733c33f37 | ||
|
|
120cba9504 | ||
|
|
873e694ccd | ||
|
|
a04ad392ff | ||
|
|
7f28203b56 | ||
|
|
c5874b6297 | ||
|
|
51179248d5 | ||
|
|
963e442e10 | ||
|
|
0d91c5eda9 | ||
|
|
4e6ebdbeda | ||
|
|
641152c54b | ||
|
|
c35b9949f7 | ||
|
|
3c8424457d | ||
|
|
706ba12284 | ||
|
|
c82421d48e | ||
|
|
83343aacc3 | ||
|
|
4cfd9d0440 | ||
|
|
132760f0eb | ||
|
|
e88524aa26 | ||
|
|
4c7a56f564 | ||
|
|
03096147f6 | ||
|
|
ac29fcffc0 | ||
|
|
ae343cc715 | ||
|
|
5abc423112 | ||
|
|
f5dbe5a0cb | ||
|
|
bdd4cf7979 | ||
|
|
f4f3bb6418 | ||
|
|
01b9a94d41 | ||
|
|
cd3b8c3de4 | ||
|
|
bf2bee53f7 | ||
|
|
4984c16261 | ||
|
|
19f071ea5a | ||
|
|
b02e734f15 | ||
|
|
58b20e71d1 | ||
|
|
d825ced844 | ||
|
|
4291c701a8 | ||
|
|
9c1186c39b | ||
|
|
4c17c6aca6 | ||
|
|
a4b09f8259 | ||
|
|
bea4e52ae9 | ||
|
|
17362b6600 | ||
|
|
a819cbc869 | ||
|
|
310a945151 | ||
|
|
b8f8302bbc | ||
|
|
33406179c3 | ||
|
|
f41e4f8e4d | ||
|
|
cbe8634bbe | ||
|
|
73ab72bfbb | ||
|
|
976ed18082 | ||
|
|
d273e9a113 | ||
|
|
e4fdaec6a5 | ||
|
|
7e53013c34 | ||
|
|
a80a5cf98d | ||
|
|
6634ee0145 | ||
|
|
b9ff04703f | ||
|
|
52adad71e7 | ||
|
|
ebe468c145 | ||
|
|
5f0a65bd36 | ||
|
|
1fc5fc9ccd | ||
|
|
99616e50af | ||
|
|
34c6f253c3 | ||
|
|
6675c76d58 | ||
|
|
ae546e85b8 | ||
|
|
f6b1919e3f | ||
|
|
65b8e527a6 | ||
|
|
201517f12b | ||
|
|
cf68478f8e | ||
|
|
1f0bf51cbe | ||
|
|
3c786b4a52 | ||
|
|
66a29f649f | ||
|
|
18fd322943 | ||
|
|
7f223f76c6 | ||
|
|
a4108b7189 | ||
|
|
d946ca1d7f | ||
|
|
0443ce7bc9 | ||
|
|
2ccc66582b | ||
|
|
274d13f151 | ||
|
|
a40637da0e | ||
|
|
b4035f926c | ||
|
|
44f94fee4a | ||
|
|
66add9f4fd | ||
|
|
4186ba86bc | ||
|
|
a58c381ade | ||
|
|
c99464da72 | ||
|
|
1955451412 | ||
|
|
36bcea7339 | ||
|
|
7389f038ce | ||
|
|
2c6e4400a6 | ||
|
|
dd49025fd8 | ||
|
|
5d96f268f8 | ||
|
|
f025d57413 | ||
|
|
ad9eec0fe3 | ||
|
|
7685080491 | ||
|
|
0bdc90293d | ||
|
|
ba9e6cf6da | ||
|
|
3ac69c47a4 | ||
|
|
a2cae4e9ea | ||
|
|
c5fbd1a544 | ||
|
|
c7c42fa501 | ||
|
|
12d6522570 | ||
|
|
c9fabbe45d | ||
|
|
c1aa774082 | ||
|
|
41dde12bbd | ||
|
|
72b45bdab0 | ||
|
|
8078fc1f6d | ||
|
|
853f2aaf0c | ||
|
|
45afe262b1 | ||
|
|
099304b079 | ||
|
|
13b70db43e | ||
|
|
7297a25365 | ||
|
|
68d8b91b7f | ||
|
|
c8d9dc3ac8 | ||
|
|
3263c9c778 | ||
|
|
91918cf963 | ||
|
|
4f813bc3f6 | ||
|
|
d3a5984f48 | ||
|
|
16daecc307 | ||
|
|
edbeacf479 | ||
|
|
5d6bbfa8e3 | ||
|
|
b794f9a7f3 | ||
|
|
148186afaf | ||
|
|
6c9e73f72b | ||
|
|
8ab7643dc6 | ||
|
|
9a17afe331 | ||
|
|
6a8ee8174e | ||
|
|
a1815304b6 | ||
|
|
d05beb69c8 | ||
|
|
6583f0b785 | ||
|
|
9ac48f35bd | ||
|
|
debc74ad74 | ||
|
|
9ed42dbdbb | ||
|
|
3365a94101 | ||
|
|
4cbe8ca0a3 | ||
|
|
39acd18e4b | ||
|
|
f50490b2bc | ||
|
|
4904d5e948 | ||
|
|
65f05f9664 | ||
|
|
a2fb77343d | ||
|
|
2d7fae28ee | ||
|
|
5a5a70fe05 | ||
|
|
795598bf30 | ||
|
|
8d06f63eef | ||
|
|
3bc0c0b7ea | ||
|
|
87c1464ce5 | ||
|
|
8f6a4bee71 | ||
|
|
725dfe2e0a | ||
|
|
a659f7a8eb | ||
|
|
a064487766 | ||
|
|
3c17e392d1 | ||
|
|
001a3117ac | ||
|
|
3ed65da8cb | ||
|
|
9c500be57f | ||
|
|
cfba5aa8ad | ||
|
|
e2af094de1 | ||
|
|
e8d7575733 | ||
|
|
f1d4663bf3 | ||
|
|
e3b9e1e7f9 | ||
|
|
d8f2875be9 | ||
|
|
21c9e2ab8d | ||
|
|
c563365b2f | ||
|
|
e97d0777db | ||
|
|
69c761cc9d | ||
|
|
1839753e7d | ||
|
|
f5223ff699 | ||
|
|
8babcb4284 | ||
|
|
0d38556da8 | ||
|
|
1059806c25 | ||
|
|
68010fd314 | ||
|
|
3bb2ce51c5 | ||
|
|
21ebffa42d | ||
|
|
3fdb372eb6 | ||
|
|
b73e3e5a60 | ||
|
|
04e0ca2d5e | ||
|
|
a1479ff180 | ||
|
|
ae4aa5e1e3 | ||
|
|
dec4b68d88 | ||
|
|
8166520e09 | ||
|
|
4d497d8f02 | ||
|
|
d21cb5b345 | ||
|
|
cb5aa998b9 | ||
|
|
8a7bfba9de | ||
|
|
fffe3c696a | ||
|
|
5279b66616 |
No files matched your search
+115
-42
@@ -26,11 +26,6 @@ Status legend
|
||||
|
||||
== Server APIs ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
@@ -41,14 +36,19 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler / apache2filter
|
||||
EXTENSION: apache_hooks
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2filter
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache_hooks
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
@@ -63,6 +63,11 @@ MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.
|
||||
STATUS: Working
|
||||
SINCE: 4.3.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: continuity
|
||||
PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: embed
|
||||
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -129,12 +134,8 @@ STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
EXTENSION: fbsql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -175,6 +176,26 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ovrimos
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -196,22 +217,6 @@ EXTENSION: sybase_ct
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== XML extensions ==
|
||||
@@ -229,6 +234,11 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: soap
|
||||
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -265,11 +275,6 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
@@ -297,17 +302,31 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fam
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
|
||||
MAINTENANCE: Maintained
|
||||
@@ -327,6 +346,11 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -337,6 +361,11 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ircg
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -352,33 +381,63 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcve
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mime_magic
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Deprecated
|
||||
STATUS: Experimental
|
||||
COMMENT: Use PECL's fileinfo extension instead
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ming
|
||||
PRIMARY MAINTAINER: Frank M. Kromann
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mnogosearch
|
||||
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mono
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
PRIMARY MAINTAINER Mark L. Woodward mlwmohawk@mohawksoft.com
|
||||
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working/Experimental
|
||||
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ncurses
|
||||
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcntl
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -439,6 +498,20 @@ EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tidy
|
||||
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tokenizer
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: w32api
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
|
||||
@@ -3,6 +3,7 @@ Installing PHP
|
||||
_________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
Preface
|
||||
1. General Installation Considerations
|
||||
2. Installation on Unix systems
|
||||
|
||||
@@ -44,6 +45,13 @@ Installing PHP
|
||||
How to change configuration settings
|
||||
_________________________________________________________________
|
||||
|
||||
Preface
|
||||
|
||||
These installation instructions were generated from the HTML version
|
||||
of the PHP Manual so formatting and linking have been altered. See the
|
||||
online and updated version at: http://php.net/install.unix
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 1. General Installation Considerations
|
||||
|
||||
Before starting the installation, first you need to know what do you
|
||||
@@ -360,9 +368,9 @@ Apache 2.0 on Unix systems
|
||||
|
||||
Warning
|
||||
|
||||
Do not use Apache 2.0.x and PHP in a production environment neither on
|
||||
Unix nor on Windows. For information on why, read the following FAQ
|
||||
entry
|
||||
We do not recommend using a threaded MPM in production with Apache2.
|
||||
Use the prefork MPM instead, or use Apache1. For information on why,
|
||||
read the related FAQ entry on using Apache2 with a threaded MPM
|
||||
|
||||
You are highly encouraged to take a look at the Apache Documentation
|
||||
to get a basic understanding of the Apache 2.0 Server.
|
||||
@@ -486,7 +494,8 @@ Apache 2.0 on Unix systems
|
||||
about the consequences and understand what you are doing. For more
|
||||
information read the Apache documentation about the MPM-Modules.
|
||||
|
||||
Note: If you want to use content negotiation, read related FAQ.
|
||||
Note: If you want to use content negotiation, read the Apache
|
||||
MultiViews FAQ.
|
||||
|
||||
Note: To build a multithreaded version of Apache your system must
|
||||
support threads. This also implies to build PHP with experimental
|
||||
@@ -870,7 +879,7 @@ Group sys
|
||||
OpenBSD installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
OpenBSD 3.4.
|
||||
OpenBSD 3.6.
|
||||
_________________________________________________________________
|
||||
|
||||
Using Binary Packages
|
||||
@@ -881,27 +890,27 @@ Using Binary Packages
|
||||
others. The files you need can be found on your OpenBSD CD or on the
|
||||
FTP site.
|
||||
|
||||
The main package you need to install is php4-core-4.3.3.tgz, which
|
||||
The main package you need to install is php4-core-4.3.8.tgz, which
|
||||
contains the basic engine (plus gettext and iconv). Next, take a look
|
||||
at the module packages, such as php4-mysql-4.3.3.tgz or
|
||||
php4-imap-4.3.3.tgz. You need to use the phpxs command to activate and
|
||||
at the module packages, such as php4-mysql-4.3.8.tgz or
|
||||
php4-imap-4.3.8.tgz. You need to use the phpxs command to activate and
|
||||
deactivate these modules in your php.ini.
|
||||
|
||||
Example 2-6. OpenBSD Package Install Example
|
||||
# pkg_add php4-core-4.3.3.tgz
|
||||
# pkg_add php4-core-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -s
|
||||
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
|
||||
(add in mysql)
|
||||
# pkg_add php4-mysql-4.3.3.tgz
|
||||
# pkg_add php4-mysql-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -a mysql
|
||||
(add in imap)
|
||||
# pkg_add php4-imap-4.3.3.tgz
|
||||
# pkg_add php4-imap-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -a imap
|
||||
(remove mysql as a test)
|
||||
# pkg_delete php4-mysql-4.3.3
|
||||
# pkg_delete php4-mysql-4.3.8
|
||||
# /usr/local/sbin/phpxs -r mysql
|
||||
(install the PEAR libraries)
|
||||
# pkg_add php4-pear-4.3.3.tgz
|
||||
# pkg_add php4-pear-4.3.8.tgz
|
||||
|
||||
Read the packages(7) manual page for more information about binary
|
||||
packages on OpenBSD.
|
||||
@@ -931,9 +940,9 @@ Common Problems
|
||||
automatically installs into the correct chroot directories, so no
|
||||
special modification is needed there. More information on the
|
||||
OpenBSD Apache is available in the OpenBSD FAQ.
|
||||
* The OpenBSD 3.4 package for the gd extension requires XFree86 to
|
||||
* The OpenBSD 3.6 package for the gd extension requires XFree86 to
|
||||
be installed. If you do not wish to use some of the font features
|
||||
that require X11, install the php4-gd-4.3.3-no_x11.tgz package
|
||||
that require X11, install the php4-gd-4.3.8-no_x11.tgz package
|
||||
instead.
|
||||
_________________________________________________________________
|
||||
|
||||
@@ -1002,7 +1011,7 @@ Using Portage (emerge)
|
||||
|
||||
The first decision you need to make is whether you want to install
|
||||
Apache 1.3.x or Apache 2.x. While both can be used with PHP, the steps
|
||||
given bellow will use Apache 1.3.x. Another thing to consider is
|
||||
given below will use Apache 1.3.x. Another thing to consider is
|
||||
whether your local Portage tree is up to date. If you have not updated
|
||||
it recently, you need to run emerge sync before anything else. This
|
||||
way, you will be using the most recent stable version of Apache and
|
||||
@@ -1444,7 +1453,7 @@ Running PHP as an Apache module
|
||||
you to change the PHP configuration from within the Apache
|
||||
configuration files. For a listing of which directives are
|
||||
PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the
|
||||
table found within the ini_set() documentation.
|
||||
List of php.ini directives appendix.
|
||||
|
||||
Note: With PHP 3, there are Apache directives that correspond to
|
||||
each configuration setting in the php3.ini name, except the name is
|
||||
@@ -1509,7 +1518,8 @@ Changing PHP configuration via the Windows registry
|
||||
active for any script running from this directory or any subdirectory
|
||||
of it. The values under the key should have the name of the PHP
|
||||
configuration directive and the string value. PHP constants in the
|
||||
values are not parsed.
|
||||
values are not parsed. However, only configuration values changeable
|
||||
in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.
|
||||
_________________________________________________________________
|
||||
|
||||
Other interfaces to PHP
|
||||
|
||||
@@ -1,17 +1,200 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
09 Dec 2004, PHP 5.0.3RC2
|
||||
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
|
||||
- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
|
||||
31 Mar 2005, PHP 5.0.4
|
||||
- Added SNMPv2 support. (harrie)
|
||||
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
|
||||
- Added length and charsetnr for field array and object in mysqli. (Georg)
|
||||
- Added checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
|
||||
and gmp_fact() to prevent SIGFPE. (Tony)
|
||||
- Changed foreach() to throw an exception if IteratorAggregate::getIterator()
|
||||
does not return an Iterator. (Marcus)
|
||||
- Changed phpize not to require libtool. (Jani)
|
||||
- Updated bundled oniguruma library (used for multibyte regular expression)
|
||||
to 3.7.0. (Moriyoshi)
|
||||
- Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi)
|
||||
Fixed bugs:
|
||||
. Bug #32063 (mb_convert_encoding ignores named entity 'alpha')
|
||||
. Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
|
||||
. bug #30573 (compiler warnings in libmbfl due to invalid type cast)
|
||||
. Bug #30549 (incorrect character translations for some ISO8859 charsets).
|
||||
- Fixed bug preventing from building oci8 as shared.
|
||||
(stanislav dot voroniy at portavita dot nl, Tony)
|
||||
- Fixed a bug in mysql_affected_rows and mysql_stmt_affected_rows when the
|
||||
api function returns -1 (Georg)
|
||||
- Fixed several leaks in ext/browscap and sapi/embed. (Andrei)
|
||||
- Fixed several leaks in ext/filepro. (Tony)
|
||||
- Fixed build system to always use bundled libtool files. (Jani)
|
||||
- Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values).
|
||||
(Georg)
|
||||
- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
|
||||
is passed. (Tony)
|
||||
- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
|
||||
of true. (Tony)
|
||||
- Fixed bug #32394 (offsetUnset() segfaults in a foreach). (Marcus)
|
||||
- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
|
||||
file). (Tony)
|
||||
- Fixed bug #32326 (Check values of Connection/Transfer-Encoding
|
||||
case-incentively in SOAP extension). (Ilia)
|
||||
- Fixed bug #32290 (call_user_func_array() calls wrong class method within
|
||||
child class). (Marcus)
|
||||
- Fixed bug #32238 (spl_array.c: void function cannot return value). (Johannes)
|
||||
- Fixed bug #32210 (proc_get_status() sets "running" always to true). (Ilia)
|
||||
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
|
||||
(Jani)
|
||||
- Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
|
||||
- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
|
||||
invalid index). (Marcus)
|
||||
- Fixed bug #32115 (dateTime SOAP encoding of timezone incorrect). (Dmitry)
|
||||
- Fixed bug #32081 (in mysqli default socket value is not being used). (Ilia)
|
||||
- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
|
||||
- Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable).
|
||||
(Rob)
|
||||
- Fixed bug #32001 (xml_parse_into_struct() function exceeds maximum
|
||||
execution time). (Rob, Moriyoshi)
|
||||
- Fixed bug #31980 (Unicode exif data not available on Windows). (Edin)
|
||||
- Fixed bug #31792 (getrusage() does not provide ru_nswap value). (Ilia)
|
||||
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
|
||||
with NULL values). (Daniel Convissor)
|
||||
- Fixed bug #31878 (Segmentation fault using clone keyword on nodes). (Rob)
|
||||
- Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani)
|
||||
- Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
|
||||
(Jani)
|
||||
- Fixed bug #31832 (SOAP encoding problem with complex types in WSDL mode with
|
||||
multiple parts). (Dmitry)
|
||||
- Fixed bug #31797 (exif_read_data() uses too low nesting limit). (Ilia)
|
||||
- Fixed bug #31796 (readline completion handler does not handle empty return
|
||||
values). (Ilia)
|
||||
- Fixed bug #31755 (Cannot create SOAP header in no namespace). (Dmitry)
|
||||
- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
|
||||
- Fixed bug #31751 (pg_parameter_status() missing on Windows). (Edin)
|
||||
- Fixed bug #31747 (SOAP Digest Authentication doesn't work with
|
||||
"HTTP/1.1 100 Continue" response). (Dmitry)
|
||||
- Fixed bug #31732 (mb_get_info() causes segfault when no parameters
|
||||
specified). (Tony)
|
||||
- Fixed bug #31710 (Wrong return values for mysqli_autocommit/commit/rollback).
|
||||
(Georg)
|
||||
- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
|
||||
- Fixed bug #31695 (Cannot redefine endpoint when using WSDL). (Dmitry)
|
||||
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
|
||||
(elod at itfais dot com)
|
||||
- Fixed bug #31683 (changes to $name in __get($name) override future
|
||||
parameters). (Dmitry)
|
||||
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
|
||||
- Fixed bug #31562 (__autoload() problem with static variables). (Marcus)
|
||||
- Fixed bug #31651 (ReflectionClass::getDefaultProperties segfaults with arrays).
|
||||
(Marcus)
|
||||
- Fixed bug #31623 (OCILogin does not support password grace period).
|
||||
(daniel dot beet at accuratesoftware dot com, Tony)
|
||||
- Fixed bug #31527 (crash in msg_send() when non-string is stored without
|
||||
being serialized). (Ilia)
|
||||
- Fixed bug #31515 (Improve performance of scandir() by factor of 10 or so). (Ilia)
|
||||
- Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
|
||||
translation). (Ilia)
|
||||
- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
|
||||
- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia)
|
||||
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
|
||||
- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
|
||||
non-existent object ref). (Tony)
|
||||
- Fixed bug #31444 (Memory leak in zend_language_scanner.c).
|
||||
(hexer at studentcenter dot org)
|
||||
- Fixed bug #31442 (unserialize broken on 64-bit systems). (Marcus)
|
||||
- Fixed bug #31440 ($GLOBALS can be overwritten via GPC when register_globals
|
||||
is enabled). (Ilia)
|
||||
- Fixed bug #31422 (No Error-Logging on SoapServer-Side). (Dmitry)
|
||||
- Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). (Joe)
|
||||
- Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani)
|
||||
- Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia)
|
||||
- Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob)
|
||||
- Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus)
|
||||
- Fixed bug #31346 (ArrayIterator::next segfaults). (Marcus)
|
||||
- Fixed bug #31190 (Unexpected warning then exception is thrown from
|
||||
call_user_func_array()). (phpbugs at domain51 dot net, Dmitry)
|
||||
- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
|
||||
- Fixed bug #31139 (XML Parser Functions seem to drop & when parsing). (Rob)
|
||||
- Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with ' get cutoff).
|
||||
(Ilia)
|
||||
- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
|
||||
was not called previously). (Ilia)
|
||||
- Fixed bug #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
|
||||
(Jani)
|
||||
- Fixed bug #31110 (PHP 4.3.10 does not compile on Tru64 UNIX 5.1B). (Derick)
|
||||
- Fixed bug #31107 (Compile failure on Solaris 9 (Intel) and gcc 3.4.3). (Derick)
|
||||
- Fixed bug #31103 (Better error message when c-client cannot be found). (Ilia)
|
||||
- Fixed bug #31101 (missing kerberos header file path with --with-openssl). (Jani)
|
||||
- Fixed bug #31098 (isset() / empty() incorrectly return true in dereference of
|
||||
a string type). (Moriyoshi)
|
||||
- Fixed bug #31087 (broken php_url_encode_hash macro). (Ilia)
|
||||
- Fixed bug #31072 (var_export() does not output an array element with an empty
|
||||
string key). (Derick)
|
||||
- Fixed bug #31060 (imageftbbox() does not use linespacing parameter). (Jani)
|
||||
- Fixed bug #31056 (php_std_date() returns invalid formatted date if
|
||||
y2k_compliance is On). (Ilia)
|
||||
- Fixed bug #31055 (apache2filter: per request leak proportional to the full
|
||||
path of the request URI). (kameshj at fastmail dot fm)
|
||||
- Fixed bug #30901 (can't send cookies with soap envelop). (Dmitry)
|
||||
- Fixed bug #30871 (Misleading warning message for array_combine()). (Andrey)
|
||||
- Fixed bug #30868 (evaluated pointer comparison in mbregex causes compile
|
||||
failure). (Moriyoshi)
|
||||
- Fixed bug #30862 (Static array with boolean indexes). (Marcus)
|
||||
- Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
|
||||
- Fixed bug #30725 (PHP segfaults when an exception is thrown in getIterator()
|
||||
within foreach). (Marcus)
|
||||
- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
|
||||
- Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
|
||||
- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
|
||||
in segfault). (pdan-php at esync dot org, Tony)
|
||||
- Fixed bug #30266 (Invalid opcode 137/1/8). (Marcus)
|
||||
- Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
|
||||
parameters). (Jani)
|
||||
- Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught
|
||||
SoapFault exception). (Dmitry)
|
||||
- Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi)
|
||||
- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
|
||||
because of fflush() called on already closed filedescriptor). (Tony)
|
||||
- Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry)
|
||||
- Fixed bug #29733 (printf() handles repeated placeholders wrong).
|
||||
(bugs dot php dot net at bluetwanger dot de, Ilia)
|
||||
- Fixed bug #29424 (width and height inverted for JPEG2000 files). (Ilia)
|
||||
- Fixed bug #29329 (configure for mysqli with shared doesn't work). (Georg)
|
||||
- Fixed bug #29136 (make test - libtool failure on MacOSX). (Jani)
|
||||
- Fixed bug #28976 (mail(): use "From:" from headers if sendmail_from is empty).
|
||||
(Jani)
|
||||
- Fixed bug #28930 (PHP sources pick wrong header files generated by bison).
|
||||
(eggert at gnu dot org, Jani)
|
||||
- Fixed bug #28840 (__destruct of a class that extends mysqli not called).
|
||||
(Marcus)
|
||||
- Fixed bug #28804 (ini-file section parsing pattern is buggy).
|
||||
(wendland at scan-plus dot de)
|
||||
- Fixed bug #28451 (corrupt EXIF headers have unlimited recursive IFD directory
|
||||
entries). (Andrei)
|
||||
- Fixed bug #28444 (Cannot access undefined property for object with overloaded
|
||||
property access). (Dmitry)
|
||||
- Fixed bug #28442 (Changing a static variables in a class changes it across
|
||||
sub/super classes.) (Marcus)
|
||||
- Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is
|
||||
Off). (Tony)
|
||||
- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
|
||||
(chris at ex-parrot dot com)
|
||||
- Fixed bug #28067 (partially incorrect utf8 to htmlentities mapping). (Derick,
|
||||
Benjamin Greiner)
|
||||
- Fixed bug #28041 (SOAP HTTP Digest Access Authentication). (Dmitry)
|
||||
- Fixed bug #27633 (Double \r problem on ftp_get in ASCII mode on Win32). (Ilia)
|
||||
- Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly).
|
||||
(Jani)
|
||||
|
||||
29 Nov 2004, PHP 5.0.3RC1
|
||||
15 Dec 2004, PHP 5.0.3
|
||||
- Added the %F modifier to *printf to render a non-locale-aware representation
|
||||
of a float with the . as decimal seperator. (Derick)
|
||||
- Fixed error handling in mysqli_multi_query. (Georg)
|
||||
- Extended the functionality of is_subclass_of() to accept either a class name
|
||||
or an object as first parameter. (Andrey)
|
||||
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
|
||||
- Fixed bug #32076 (ReflectionMethod::isDestructor() always return true).
|
||||
(Derick, Tony)
|
||||
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
|
||||
- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
|
||||
- Fixed bug #30994 (SOAP server unable to handle request with references).
|
||||
(Dmitry)
|
||||
- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
|
||||
- Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg)
|
||||
- Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or
|
||||
@@ -86,11 +269,16 @@ PHP NEWS
|
||||
- Fixed bug #29211 (SoapClient doesn't request wsdl through proxy). (Rob)
|
||||
- Fixed bug #28817 (Var problem when extending domDocument). (Georg)
|
||||
- Fixed bug #28599 (strtotime fails with zero base time). (Derick)
|
||||
- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
|
||||
- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul
|
||||
characters). (Moriyoshi)
|
||||
- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #28209 (strtotime("now")). (Derick)
|
||||
- Fixed bug #27798 (private / protected variables not exposed by
|
||||
get_object_vars() inside class). (Marcus)
|
||||
- Fixed bug #27728 (Can't return within a zend_try {} block or the previous
|
||||
bailout state isn't restored. (Andi)
|
||||
- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write).
|
||||
(Christian)
|
||||
|
||||
|
||||
+18
-10
@@ -29,7 +29,14 @@ Having said that, here are the organizational rules:
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
|
||||
|
||||
Currently we have the following branches in use:
|
||||
HEAD Will become PHP 5.1. This CVS branch is for active development.
|
||||
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
|
||||
on this branch.
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
@@ -61,26 +68,27 @@ The next few rules are more of a technical nature.
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
Use a - to start a new item in your commit message.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c
|
||||
you added a new format option for date() function, and in string.c you fixed
|
||||
a memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c:
|
||||
|
||||
(PHP date) Added new 'K' format modifier for printing out number of
|
||||
days until New Year's Eve.
|
||||
- Added new 'K' format modifier to date() for printing out number of days until
|
||||
New Year's Eve.
|
||||
|
||||
For string.c:
|
||||
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
|
||||
# Man, that thing was leaking all over the place!
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
@@ -90,7 +98,7 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
|
||||
Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
|
||||
+2
-24
@@ -296,11 +296,11 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
}
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -481,13 +481,6 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(NETWARE)
|
||||
/* There seems to be some problem with the LibC call: NXThreadGetId().
|
||||
* Due to this, the PHPMyAdmin application is abending in PHP calls.
|
||||
* Used the call, kCurrentThread instead and it works fine.
|
||||
*/
|
||||
/* return NXThreadGetId(); */
|
||||
return kCurrentThread();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
@@ -508,24 +501,9 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
#ifdef NETWARE
|
||||
#ifndef USE_MPK
|
||||
/* To use the Recursive Mutex Locking of LibC */
|
||||
long flags = NX_MUTEX_RECURSIVE;
|
||||
NXHierarchy_t order = 0;
|
||||
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
#ifdef USE_MPK
|
||||
mutexp = kMutexAlloc((BYTE*)"PHP-TSRM");
|
||||
#else
|
||||
mutexp = NXMutexAlloc(flags, order, &lockInfo);
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
|
||||
pth_mutex_init(mutexp);
|
||||
|
||||
+2
-16
@@ -14,8 +14,8 @@
|
||||
#define TSRM_H
|
||||
|
||||
/* #ifndef WIN32 */
|
||||
#if !defined(WIN32) && !defined(NETWARE)
|
||||
# include "tsrm_config.h"
|
||||
#ifndef WIN32
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -42,13 +42,6 @@
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <shellapi.h>
|
||||
#elif defined(NETWARE)
|
||||
# include <nks/thread.h>
|
||||
#ifdef USE_MPK
|
||||
# include <mpklib4php.h>
|
||||
#else
|
||||
# include <nks/synch.h>
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
#elif defined(PTHREADS)
|
||||
@@ -66,13 +59,6 @@ typedef int ts_rsrc_id;
|
||||
#ifdef TSRM_WIN32
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(NETWARE)
|
||||
# define THREAD_T NXThreadId_t
|
||||
#ifdef USE_MPK
|
||||
# define MUTEX_T MUTEX
|
||||
#else
|
||||
# define MUTEX_T NXMutex_t *
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
# define THREAD_T pth_t
|
||||
# define MUTEX_T pth_mutex_t *
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
+13
-5
@@ -30,7 +30,7 @@ dnl PTHREADS_FLAGS
|
||||
dnl
|
||||
dnl Set some magic defines to achieve POSIX threads conformance
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_FLAGS,[
|
||||
AC_DEFUN([PTHREADS_FLAGS],[
|
||||
if test -z "$host_alias" && test -n "$host"; then
|
||||
host_alias=$host
|
||||
fi
|
||||
@@ -65,7 +65,7 @@ dnl PTHREADS_CHECK_COMPILE
|
||||
dnl
|
||||
dnl Check whether the current setup can use POSIX threads calls
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
|
||||
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
|
||||
AC_TRY_RUN( [
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
@@ -84,7 +84,15 @@ int main() {
|
||||
pthreads_working=yes
|
||||
], [
|
||||
pthreads_working=no
|
||||
], pthreads_working=no ) ] )dnl
|
||||
], [
|
||||
dnl For cross compiling running this test is of no use. NetWare supports pthreads
|
||||
pthreads_working=no
|
||||
case $target_alias in
|
||||
*netware*)
|
||||
pthreads_working=yes
|
||||
esac
|
||||
]
|
||||
) ] )dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK()
|
||||
dnl
|
||||
@@ -100,7 +108,7 @@ dnl -pthreads gcc (Solaris)
|
||||
dnl -qthreaded AIX cc V5
|
||||
dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK,[
|
||||
AC_DEFUN([PTHREADS_CHECK],[
|
||||
|
||||
if test "$beos_threads" = "1"; then
|
||||
pthreads_working="yes"
|
||||
@@ -154,7 +162,7 @@ fi
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
|
||||
AC_DEFUN([PTHREADS_ASSIGN_VARS],[
|
||||
if test -n "$ac_cv_pthreads_lib"; then
|
||||
LIBS="$LIBS -l$ac_cv_pthreads_lib"
|
||||
fi
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
|
||||
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
|
||||
echo 'void somefunc() { };' > conftest.c
|
||||
@@ -21,7 +21,7 @@ AC_DEFUN(TSRM_CHECK_GCC_ARG,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(TSRM_BASIC_CHECKS,[
|
||||
AC_DEFUN([TSRM_BASIC_CHECKS],[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
||||
@@ -33,7 +33,7 @@ AC_CHECK_HEADERS(stdarg.h)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(TSRM_CHECK_PTH,[
|
||||
AC_DEFUN([TSRM_CHECK_PTH],[
|
||||
|
||||
AC_MSG_CHECKING(for GNU Pth)
|
||||
PTH_PREFIX="`$1 --prefix`"
|
||||
@@ -50,7 +50,7 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(TSRM_CHECK_ST,[
|
||||
AC_DEFUN([TSRM_CHECK_ST],[
|
||||
if test -r "$1/include/st.h"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$1/include"
|
||||
LDFLAGS="$LDFLAGS -L$1/lib"
|
||||
@@ -70,7 +70,7 @@ AC_DEFUN(TSRM_CHECK_ST,[
|
||||
sinclude(threads.m4)
|
||||
sinclude(TSRM/threads.m4)
|
||||
|
||||
AC_DEFUN(TSRM_CHECK_PTHREADS,[
|
||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
@@ -89,7 +89,7 @@ fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(TSRM_THREADS_CHECKS,[
|
||||
AC_DEFUN([TSRM_THREADS_CHECKS],[
|
||||
|
||||
dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#elif defined(NETWARE)
|
||||
# include "tsrm_config.nw.h"
|
||||
#else
|
||||
# include "tsrm_config.h"
|
||||
# include <tsrm_config.h>
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@ CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -885,7 +885,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
dir_length = CWDG(cwd).cwd_length;
|
||||
dir = CWDG(cwd).cwd;
|
||||
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +1+1);
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +extra+1+1);
|
||||
if (!command_line) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
|
||||
+2
-2
@@ -6446,13 +6446,13 @@
|
||||
2003-02-08 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
The string.h is already avaliable through zend.h, so the manual inclusion
|
||||
The string.h is already available through zend.h, so the manual inclusion
|
||||
is not necessary.
|
||||
|
||||
2003-02-07 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
Added a check to ensure that string.h is avaliable before trying to use it.
|
||||
Added a check to ensure that string.h is available before trying to use it.
|
||||
|
||||
Thanks Andi.
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ libZend_la_SOURCES=\
|
||||
zend_objects_API.c zend_ts_hash.c zend_stream.c zend_mm.c \
|
||||
zend_default_classes.c zend_reflection_api.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c
|
||||
zend_strtod.c zend_multibyte.c
|
||||
|
||||
libZend_la_LDFLAGS =
|
||||
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
|
||||
|
||||
+38
-7
@@ -4,7 +4,7 @@ dnl
|
||||
dnl This file contains Zend specific autoconf functions.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(LIBZEND_BISON_CHECK,[
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
|
||||
if test "$YACC" != "bison -y"; then
|
||||
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
|
||||
@@ -19,7 +19,29 @@ fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
|
||||
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif],
|
||||
[if (($1 *) 0)
|
||||
return 0;
|
||||
if (sizeof ($1))
|
||||
return 0;
|
||||
],[
|
||||
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z_-,A-Z__), 1,[Define if $1 type is present. ])
|
||||
AC_MSG_RESULT(yes)
|
||||
], AC_MSG_RESULT(no)
|
||||
)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
|
||||
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
@@ -42,6 +64,8 @@ if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
inttypes.h \
|
||||
stdint.h \
|
||||
limits.h \
|
||||
malloc.h \
|
||||
string.h \
|
||||
@@ -58,12 +82,12 @@ dlfcn.h)
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_DEFUN(LIBZEND_LIBDL_CHECKS,[
|
||||
AC_DEFUN([LIBZEND_LIBDL_CHECKS],[
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
|
||||
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBZEND_DLSYM_CHECK,[
|
||||
AC_DEFUN([LIBZEND_DLSYM_CHECK],[
|
||||
dnl
|
||||
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
|
||||
dnl
|
||||
@@ -82,6 +106,10 @@ dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
||||
dnl Check if int32_t and uint32_t are defined
|
||||
LIBZEND_CHECK_INT_TYPE(int32_t)
|
||||
LIBZEND_CHECK_INT_TYPE(uint32_t)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
@@ -95,7 +123,7 @@ ZEND_FP_EXCEPT
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
|
||||
AC_DEFUN([LIBZEND_ENABLE_DEBUG],[
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Compile with debugging symbols],[
|
||||
@@ -106,7 +134,7 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
|
||||
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
|
||||
|
||||
AC_ARG_ENABLE(maintainer-zts,
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only],[
|
||||
@@ -237,6 +265,9 @@ int main()
|
||||
LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
|
||||
], [], [
|
||||
dnl cross-compile needs something here
|
||||
LIBZEND_MM_ALIGN=8
|
||||
])
|
||||
|
||||
AC_MSG_RESULT(done)
|
||||
@@ -244,7 +275,7 @@ AC_MSG_RESULT(done)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
|
||||
AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
|
||||
|
||||
])
|
||||
|
||||
+4
-4
@@ -23,9 +23,7 @@
|
||||
#define ZEND_DLEXPORT
|
||||
#define ZEND_DLIMPORT
|
||||
|
||||
#ifndef NETWARE
|
||||
@TOP@
|
||||
#endif
|
||||
|
||||
#undef uint
|
||||
#undef ulong
|
||||
@@ -33,9 +31,7 @@
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
#ifndef NETWARE
|
||||
@BOTTOM@
|
||||
#endif
|
||||
|
||||
#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
|
||||
|
||||
@@ -47,6 +43,10 @@
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
+31
-4
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN(ZEND_FP_EXCEPT,[
|
||||
AC_DEFUN([ZEND_FP_EXCEPT],[
|
||||
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <floatingpoint.h>
|
||||
@@ -23,7 +23,7 @@ fp_except x = (fp_except) 0;
|
||||
dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
|
||||
AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[
|
||||
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
|
||||
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
|
||||
ac_cv_broken_sprintf=no
|
||||
@@ -41,7 +41,34 @@ AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
|
||||
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
dnl
|
||||
dnl AC_ZEND_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([AC_ZEND_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
@@ -10,10 +10,14 @@ AC_PROG_CC
|
||||
AM_PROG_LEX
|
||||
AM_PROG_CC_STDC
|
||||
ZEND_VERSION=$VERSION
|
||||
AC_ZEND_C_BIGENDIAN
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
test -z "$CFLAGS" && auto_cflags=1
|
||||
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
|
||||
sinclude(Zend.m4)
|
||||
|
||||
LIBZEND_BASIC_CHECKS
|
||||
|
||||
@@ -19,55 +19,55 @@ for ($i = 0; $i < 8; $i++) {
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
|
||||
|
||||
@@ -11,11 +11,19 @@ class array_iterator implements IteratorAggregate {
|
||||
|
||||
$obj = new array_iterator;
|
||||
|
||||
foreach ($obj as $property => $value) {
|
||||
var_dump($value);
|
||||
try
|
||||
{
|
||||
foreach ($obj as $property => $value)
|
||||
{
|
||||
var_dump($value);
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo $e->getMessage() . "\n";
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator in %sbug26229.php on line %d
|
||||
===DONE===
|
||||
Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator
|
||||
===DONE===
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27145 (Errors messages print unmangled PPP property names)
|
||||
--FILE--
|
||||
<?php
|
||||
class a {
|
||||
protected static $v = "aa";
|
||||
}
|
||||
class b extends a {
|
||||
protected static $v = "bb";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot redeclare property static protected a::$v in class b in %s on line %d
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
--TEST--
|
||||
Bug #28442 (Changing a static variables in a class changes it across sub/super classes.)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ClassA
|
||||
{
|
||||
static $prop;
|
||||
}
|
||||
|
||||
class ClassB extends ClassA
|
||||
{
|
||||
static $prop;
|
||||
}
|
||||
|
||||
class ClassC extends ClassB
|
||||
{
|
||||
}
|
||||
|
||||
echo "===INIT===\n";
|
||||
ClassA::$prop = 'A';
|
||||
ClassB::$prop = 'B';
|
||||
ClassC::$prop = 'C';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetA===\n";
|
||||
ClassA::$prop = 'A2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetB===\n";
|
||||
ClassB::$prop = 'B2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetC===\n";
|
||||
ClassC::$prop = 'C2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
===INIT===
|
||||
string(1) "A"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
===SetA===
|
||||
string(2) "A2"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
===SetB===
|
||||
string(2) "A2"
|
||||
string(2) "B2"
|
||||
string(2) "B2"
|
||||
===SetC===
|
||||
string(2) "A2"
|
||||
string(2) "C2"
|
||||
string(2) "C2"
|
||||
===DONE===
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #30725 (PHP segfaults when an exception is thrown in getIterator() within foreach)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test implements IteratorAggregate
|
||||
{
|
||||
function getIterator()
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$it = new Test;
|
||||
foreach($it as $v)
|
||||
{
|
||||
echo "Fail\n";
|
||||
}
|
||||
echo "Wrong\n";
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo "Caught\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Caught
|
||||
===DONE===
|
||||
@@ -0,0 +1,53 @@
|
||||
--TEST--
|
||||
Bug #31098 (isset() / empty() incorrectly returns true in dereference of a wrong type)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = '';
|
||||
var_dump(isset($a->b));
|
||||
$a = 'a';
|
||||
var_dump(isset($a->b));
|
||||
$a = '0';
|
||||
var_dump(isset($a->b));
|
||||
$a = '';
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = 'a';
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = '0';
|
||||
var_dump(isset($a{'b'}));
|
||||
|
||||
$simpleString = "Bogus String Text";
|
||||
echo isset($simpleString->wrong)?"bug\n":"ok\n";
|
||||
echo isset($simpleString["wrong"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString[-1])?"bug\n":"ok\n";
|
||||
echo isset($simpleString[0])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["0"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["16"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["17"])?"bug\n":"ok\n";
|
||||
echo isset($simpleString["wrong"][0])?"bug\n":"ok\n";
|
||||
echo $simpleString->wrong === null?"ok\n":"bug\n";
|
||||
echo $simpleString["wrong"] === "B"?"ok\n":"bug\n";
|
||||
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
|
||||
$simpleString["wrong"] = "f";
|
||||
echo $simpleString["0"] === "f"?"ok\n":"bug\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
|
||||
Notice: Trying to get property of non-object in %sbug31098.php on line %d
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
@@ -0,0 +1,97 @@
|
||||
--TEST--
|
||||
Bug #31683 (changes to $name in __get($name) override future parameters)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo implements ArrayAccess {
|
||||
|
||||
function __get($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function __set($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function __call($test, $arg) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetget($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
return 123;
|
||||
}
|
||||
|
||||
function offsetset($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function offsetexists($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetunset($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$foo = new Foo();
|
||||
$a = "ok";
|
||||
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$foo->ok("ok");
|
||||
$foo->ok;
|
||||
$foo->ok = "ok";
|
||||
$x = $foo["ok"];
|
||||
$foo["ok"] = "ok";
|
||||
isset($foo["ok"]);
|
||||
unset($foo["ok"]);
|
||||
// $foo[];
|
||||
$foo[] = "ok";
|
||||
// isset($foo[]);
|
||||
// unset($foo[]);
|
||||
$foo->$a;
|
||||
echo "---\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
NULL
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
---
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
NULL
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
---
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #31720 (Invalid object callbacks not caught in array_walk())
|
||||
--FILE--
|
||||
<?
|
||||
$array = array('at least one element');
|
||||
|
||||
array_walk($array, array($nonesuchvar,'show'));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: nonesuchvar in %s on line %d
|
||||
|
||||
Notice: Non-callable array passed to zend_call_function() in %s on line %d
|
||||
|
||||
Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
|
||||
===DONE===
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
Bug # 32226 (SEGV with exception handler on non existing instance)
|
||||
--FILE--
|
||||
<?
|
||||
|
||||
class A
|
||||
{
|
||||
public function A()
|
||||
{
|
||||
set_exception_handler(array($this, 'EH'));
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public function EH()
|
||||
{
|
||||
restore_exception_handler();
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$a = new A();
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo "Caught\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Caught
|
||||
===DONE===
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #32290 (calling call_user_func_array() ends in infinite loop within child class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($this)\n";
|
||||
return --$i;
|
||||
}
|
||||
}
|
||||
|
||||
class TestB extends TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($this)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array("TestA","doSomething"), array($i));
|
||||
}
|
||||
}
|
||||
|
||||
$x = new TestB();
|
||||
var_dump($x->doSomething(1));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
TestB::doSomething(Object id #%d)
|
||||
TestA::doSomething(Object id #%d)
|
||||
int(1)
|
||||
===DONE===
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug - crash in debug_backtrace when trace starts in eval
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
bar();
|
||||
}
|
||||
|
||||
function bar() {
|
||||
boo();
|
||||
}
|
||||
|
||||
function boo(){
|
||||
debug_print_backtrace();
|
||||
}
|
||||
|
||||
eval("foo();");
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
#0 boo() called at [%s:%d]
|
||||
#1 bar() called at [%s:%d]
|
||||
#2 foo() called at [%s(%d) : eval()'d code:1]
|
||||
#3 eval() called at [%s:%d]
|
||||
Done
|
||||
===DONE===
|
||||
+8
-8
@@ -494,6 +494,12 @@ static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
{
|
||||
shutdown_memory_manager(0, 1 TSRMLS_CC);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -503,14 +509,6 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
{
|
||||
shutdown_memory_manager(0, 1 TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
/* FreeBSD and DragonFly floating point precision fix */
|
||||
#include <floatingpoint.h>
|
||||
@@ -705,6 +703,7 @@ void zend_shutdown(TSRMLS_D)
|
||||
|
||||
zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
|
||||
free(GLOBAL_AUTO_GLOBALS_TABLE);
|
||||
|
||||
zend_shutdown_extensions(TSRMLS_C);
|
||||
free(zend_version_info);
|
||||
|
||||
@@ -839,6 +838,7 @@ static int exec_done_cb(zend_module_entry *module TSRMLS_DC)
|
||||
void zend_post_deactivate_modules(TSRMLS_D)
|
||||
{
|
||||
zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
|
||||
zend_hash_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+22
-6
@@ -22,7 +22,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "2.0.3RC2"
|
||||
#define ZEND_VERSION "2.0.4-dev"
|
||||
|
||||
#define ZEND_ENGINE_2
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
# include "zend_config.w32.h"
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#elif defined(NETWARE)
|
||||
# include "zend_config.nw.h"
|
||||
# include "acconfig.h"
|
||||
# include <zend_config.h>
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#elif defined(__riscos__)
|
||||
# include "zend_config.h"
|
||||
# include <zend_config.h>
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#else
|
||||
# include "zend_config.h"
|
||||
# include <zend_config.h>
|
||||
# define ZEND_PATHS_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
@@ -103,6 +103,8 @@ const char *zend_mh_bundle_error(void);
|
||||
|
||||
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
|
||||
# elif defined(RTLD_DEEPBIND)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
|
||||
# else
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# endif
|
||||
@@ -117,7 +119,7 @@ const char *zend_mh_bundle_error(void);
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#elif defined(HAVE_MACH_O_DYLD_H)
|
||||
# define DL_LOAD(libname) zend_mh_bundle_load(libname)
|
||||
# define DL_UNLOAD(handle) zend_mh_bundle_unload(handle)
|
||||
# define DL_UNLOAD zend_mh_bundle_unload
|
||||
# define DL_FETCH_SYMBOL(h,s) zend_mh_bundle_symbol(h,s)
|
||||
# define DL_ERROR zend_mh_bundle_error
|
||||
# define DL_HANDLE void *
|
||||
@@ -601,6 +603,20 @@ END_EXTERN_C()
|
||||
(*ppzv_dest)->refcount = refcount; \
|
||||
}
|
||||
|
||||
#define SEPARATE_ARG_IF_REF(varptr) \
|
||||
if (PZVAL_IS_REF(varptr)) { \
|
||||
zval *original_var = varptr; \
|
||||
ALLOC_ZVAL(varptr); \
|
||||
varptr->value = original_var->value; \
|
||||
varptr->type = original_var->type; \
|
||||
varptr->is_ref = 0; \
|
||||
varptr->refcount = 1; \
|
||||
zval_copy_ctor(varptr); \
|
||||
} else { \
|
||||
varptr->refcount++; \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 4
|
||||
|
||||
|
||||
|
||||
+30
-24
@@ -687,6 +687,16 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destro
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC)
|
||||
{
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* This function requires 'properties' to contain all props declared in the
|
||||
* class and all props being public. If only a subset is given or the class
|
||||
* has protected members then you need to merge the properties seperately by
|
||||
@@ -701,11 +711,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
|
||||
zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
|
||||
}
|
||||
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
zend_update_class_constants(class_type TSRMLS_CC);
|
||||
|
||||
arg->type = IS_OBJECT;
|
||||
if (class_type->create_object == NULL) {
|
||||
@@ -1482,9 +1488,6 @@ void module_destructor(zend_module_entry *module)
|
||||
if (module->type == MODULE_TEMPORARY) {
|
||||
zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC);
|
||||
clean_module_constants(module->module_number TSRMLS_CC);
|
||||
if (module->request_shutdown_func) {
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
if (module->module_started && module->module_shutdown_func) {
|
||||
@@ -1498,9 +1501,9 @@ void module_destructor(zend_module_entry *module)
|
||||
zend_unregister_functions(module->functions, -1, NULL TSRMLS_CC);
|
||||
}
|
||||
|
||||
#if HAVE_LIBDL
|
||||
#if HAVE_LIBDL || defined(HAVE_MACH_O_DYLD_H)
|
||||
if (module->handle) {
|
||||
dlclose(module->handle);
|
||||
DL_UNLOAD(module->handle);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1522,24 +1525,23 @@ int module_registry_request_startup(zend_module_entry *module TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
/* for persistent modules - call request shutdown and flag NOT to erase
|
||||
* for temporary modules - do nothing, and flag to erase
|
||||
*/
|
||||
/* call request shutdown for all modules */
|
||||
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
|
||||
{
|
||||
switch (module->type) {
|
||||
case MODULE_PERSISTENT:
|
||||
if (module->request_shutdown_func) {
|
||||
if (module->request_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Request shutdown\n", module->name);
|
||||
zend_printf("%s: Request shutdown\n", module->name);
|
||||
#endif
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC)
|
||||
{
|
||||
switch (module->type) {
|
||||
case MODULE_TEMPORARY:
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1601,7 +1603,9 @@ ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *cla
|
||||
ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int num_interfaces, ...)
|
||||
{
|
||||
zend_class_entry *interface_entry;
|
||||
int ce_num = class_entry->num_interfaces, impl_num;
|
||||
va_list interface_list;
|
||||
va_start(interface_list, num_interfaces);
|
||||
|
||||
if (class_entry->type & ZEND_INTERNAL_CLASS) {
|
||||
class_entry->interfaces = realloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+num_interfaces));
|
||||
@@ -1609,11 +1613,13 @@ ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int
|
||||
class_entry->interfaces = erealloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+num_interfaces));
|
||||
}
|
||||
|
||||
va_start(interface_list, num_interfaces);
|
||||
while (num_interfaces--) {
|
||||
interface_entry = va_arg(interface_list, zend_class_entry *);
|
||||
class_entry->interfaces[class_entry->num_interfaces++] = interface_entry;
|
||||
zend_do_implement_interface(class_entry, interface_entry TSRMLS_CC);
|
||||
}
|
||||
impl_num = class_entry->num_interfaces;
|
||||
while(ce_num < impl_num) {
|
||||
zend_do_implement_interface(class_entry, class_entry->interfaces[ce_num++] TSRMLS_CC);
|
||||
}
|
||||
va_end(interface_list);
|
||||
}
|
||||
|
||||
@@ -188,6 +188,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na
|
||||
ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
|
||||
ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC);
|
||||
|
||||
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC);
|
||||
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC);
|
||||
ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC);
|
||||
ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
|
||||
|
||||
@@ -433,7 +433,7 @@ ZEND_FUNCTION(error_reporting)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool define(string constant_name, mixed value, case_sensitive=true)
|
||||
/* {{{ proto bool define(string constant_name, mixed value, boolean case_sensitive=true)
|
||||
Define a new constant */
|
||||
ZEND_FUNCTION(define)
|
||||
{
|
||||
@@ -1592,6 +1592,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
|
||||
while (ptr) {
|
||||
class_name = call_type = NULL;
|
||||
arg_array = NULL;
|
||||
if (ptr->op_array) {
|
||||
filename = ptr->op_array->filename;
|
||||
lineno = ptr->opline->lineno;
|
||||
@@ -1736,7 +1737,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
|
||||
if (function_name) {
|
||||
add_assoc_string_ex(stack_frame, "function", sizeof("function"), function_name, 1);
|
||||
|
||||
if (ptr->object) {
|
||||
if (ptr->object && Z_TYPE_P(ptr->object) == IS_OBJECT) {
|
||||
class_name = Z_OBJCE(*ptr->object)->name;
|
||||
call_type = "->";
|
||||
} else if (ptr->function_state.function->common.scope) {
|
||||
@@ -1868,10 +1869,13 @@ ZEND_FUNCTION(get_extension_funcs)
|
||||
|
||||
convert_to_string_ex(extension_name);
|
||||
if (strncasecmp(Z_STRVAL_PP(extension_name), "zend", sizeof("zend"))) {
|
||||
if (zend_hash_find(&module_registry, Z_STRVAL_PP(extension_name),
|
||||
char *lcname = zend_str_tolower_dup(Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name));
|
||||
if (zend_hash_find(&module_registry, lcname,
|
||||
Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) {
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
efree(lcname);
|
||||
|
||||
if (!(func = module->functions)) {
|
||||
RETURN_FALSE;
|
||||
|
||||
+2
-8
@@ -19,7 +19,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include "zend_language_parser.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_constants.h"
|
||||
@@ -68,7 +68,7 @@ static void build_runtime_defined_function_key(zval *result, char *name, int nam
|
||||
uint char_pos_len;
|
||||
char *filename;
|
||||
|
||||
char_pos_len = zend_sprintf(char_pos_buf, "%x", (unsigned int) LANG_SCNG(_yy_last_accepting_cpos));
|
||||
char_pos_len = zend_sprintf(char_pos_buf, "%p", LANG_SCNG(_yy_last_accepting_cpos));
|
||||
if (CG(active_op_array)->filename) {
|
||||
filename = CG(active_op_array)->filename;
|
||||
} else {
|
||||
@@ -1908,12 +1908,6 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
|
||||
zend_hash_del(&ce->default_properties, prot_name, prot_name_length+1);
|
||||
}
|
||||
pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
|
||||
} else if (!(child_info->flags & ZEND_ACC_PRIVATE) && (child_info->flags & ZEND_ACC_STATIC)) {
|
||||
char *prop_name, *tmp;
|
||||
|
||||
zend_unmangle_property_name(child_info->name, &tmp, &prop_name);
|
||||
zend_error(E_COMPILE_ERROR, "Cannot redeclare property static %s %s::$%s in class %s",
|
||||
zend_visibility_string(child_info->flags), parent_ce->name, prop_name, ce->name);
|
||||
}
|
||||
return 0; /* Don't copy from parent */
|
||||
} else {
|
||||
|
||||
@@ -100,12 +100,15 @@ static zend_object_value zend_default_exception_new(zend_class_entry *class_type
|
||||
return obj.value.obj;
|
||||
}
|
||||
|
||||
|
||||
ZEND_METHOD(exception, __clone)
|
||||
{
|
||||
/* Should never be executable */
|
||||
zend_throw_exception(NULL, "Cannot clone object using __clone()", 0 TSRMLS_CC);
|
||||
}
|
||||
|
||||
/* {{{ proto Exception::__construct()
|
||||
Exception constructor */
|
||||
ZEND_METHOD(exception, __construct)
|
||||
{
|
||||
char *message = NULL;
|
||||
@@ -127,6 +130,7 @@ ZEND_METHOD(exception, __construct)
|
||||
zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define DEFAULT_0_PARAMS \
|
||||
if (ZEND_NUM_ARGS() > 0) { \
|
||||
@@ -143,40 +147,61 @@ static void _default_exception_get_entry(zval *object, char *name, int name_len,
|
||||
zval_copy_ctor(return_value);
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto Exception::getFile()
|
||||
Obtain the file name in which the exception occurred */
|
||||
ZEND_METHOD(exception, getFile)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "file", sizeof("file")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getLine()
|
||||
Obtain the line number in which the exception occurred */
|
||||
ZEND_METHOD(exception, getLine)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "line", sizeof("line")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getMessage()
|
||||
Obtain the exception message */
|
||||
ZEND_METHOD(exception, getMessage)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "message", sizeof("message")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getCode()
|
||||
Obtain the user-defined exception code */
|
||||
ZEND_METHOD(exception, getCode)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "code", sizeof("code")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getTrace()
|
||||
Obtain a stack trace for the location in which the exception occurred */
|
||||
ZEND_METHOD(exception, getTrace)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "trace", sizeof("trace")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ ZEND_METHOD(exception, gettraceasstring) */
|
||||
#define TRACE_APPEND_CHR(chr) \
|
||||
|
||||
+43
-20
@@ -175,9 +175,15 @@ static inline void zend_fetch_property_address_inner(zval *object, znode *op2, z
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **ptr_ptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, prop_ptr TSRMLS_CC);
|
||||
if(NULL == ptr_ptr) {
|
||||
zend_error(E_ERROR, "Cannot access undefined property for object with overloaded property access");
|
||||
if (Z_OBJ_HT_P(object)->read_property &&
|
||||
(T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC)) != NULL) {
|
||||
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot access undefined property for object with overloaded property access");
|
||||
}
|
||||
} else {
|
||||
T(result->u.var).var.ptr_ptr = ptr_ptr;
|
||||
}
|
||||
T(result->u.var).var.ptr_ptr = ptr_ptr;
|
||||
} else if (Z_OBJ_HT_P(object)->read_property) {
|
||||
T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC);
|
||||
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
|
||||
@@ -763,13 +769,13 @@ static void zend_fetch_var_address(zend_op *opline, temp_variable *Ts, int type
|
||||
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
/* break missing intentionally */
|
||||
case BP_VAR_IS:
|
||||
retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_RW:
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
/* break missing intentionally */
|
||||
case BP_VAR_W: {
|
||||
zval *new_zval = &EG(uninitialized_zval);
|
||||
@@ -1911,10 +1917,20 @@ static inline int zend_incdec_op_helper(incdec_t incdec_op_arg, ZEND_OPCODE_HAND
|
||||
zend_error(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
if (*var_ptr == EG(error_zval_ptr)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &opline->result);
|
||||
AI_USE_PTR(EX_T(opline->result.u.var).var);
|
||||
NEXT_OPCODE();
|
||||
switch (opline->opcode) {
|
||||
case ZEND_PRE_INC:
|
||||
case ZEND_PRE_DEC:
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &opline->result);
|
||||
AI_USE_PTR(EX_T(opline->result.u.var).var);
|
||||
NEXT_OPCODE();
|
||||
break;
|
||||
case ZEND_POST_INC:
|
||||
case ZEND_POST_DEC:
|
||||
EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
|
||||
NEXT_OPCODE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (opline->opcode) {
|
||||
@@ -2438,7 +2454,7 @@ int zend_fetch_class_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
|
||||
|
||||
if (opline->op2.op_type == IS_UNUSED) {
|
||||
EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
|
||||
EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, ZEND_FETCH_CLASS_AUTO, opline->extended_value TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -3741,10 +3757,17 @@ int zend_fe_reset_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr TSRMLS_CC);
|
||||
|
||||
if (iter) {
|
||||
if (iter && !EG(exception)) {
|
||||
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
|
||||
} else {
|
||||
array_ptr->refcount++;
|
||||
zval_ptr_dtor(&array_ptr);
|
||||
FREE_OP(Ts, op1, EG(free_op1));
|
||||
if (!EG(exception)) {
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
|
||||
}
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4032,14 +4055,14 @@ static int zend_isset_isempty_dim_prop_obj_handler(int prop_dim, ZEND_OPCODE_HAN
|
||||
} else {
|
||||
result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
|
||||
}
|
||||
} else if ((*container)->type == IS_STRING) { /* string offsets */
|
||||
zval tmp_offset;
|
||||
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
|
||||
zval tmp;
|
||||
|
||||
if (Z_TYPE_P(offset) != IS_LONG) {
|
||||
tmp_offset = *offset;
|
||||
zval_copy_ctor(&tmp_offset);
|
||||
convert_to_long(&tmp_offset);
|
||||
offset = &tmp_offset;
|
||||
if (offset->type != IS_LONG) {
|
||||
tmp = *offset;
|
||||
zval_copy_ctor(&tmp);
|
||||
convert_to_long(&tmp);
|
||||
offset = &tmp;
|
||||
}
|
||||
switch (opline->extended_value) {
|
||||
case ZEND_ISSET:
|
||||
@@ -4055,7 +4078,7 @@ static int zend_isset_isempty_dim_prop_obj_handler(int prop_dim, ZEND_OPCODE_HAN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EX_T(opline->result.u.var).tmp_var.type = IS_BOOL;
|
||||
|
||||
switch (opline->extended_value) {
|
||||
@@ -4293,7 +4316,7 @@ int zend_verify_abstract_class_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
|
||||
void zend_init_opcodes_handlers()
|
||||
{
|
||||
memset(zend_opcode_handlers, sizeof(zend_opcode_handlers), 0);
|
||||
memset(zend_opcode_handlers, 0, sizeof(zend_opcode_handlers));
|
||||
zend_opcode_handlers[ZEND_NOP] = zend_nop_handler;
|
||||
zend_opcode_handlers[ZEND_ADD] = zend_add_handler;
|
||||
zend_opcode_handlers[ZEND_SUB] = zend_sub_handler;
|
||||
|
||||
+17
-1
@@ -499,6 +499,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
|
||||
case IS_STRING:
|
||||
zend_symtable_update(p->value.ht, const_value.value.str.val, const_value.value.str.len+1, &new_val, sizeof(zval *), NULL);
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
zend_hash_index_update(p->value.ht, const_value.value.lval, &new_val, sizeof(zval *), NULL);
|
||||
break;
|
||||
@@ -571,6 +572,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
zval *params_array;
|
||||
int call_via_handler = 0;
|
||||
|
||||
if (EG(exception)) {
|
||||
return FAILURE; /* we would result in an instable executor otherwise */
|
||||
}
|
||||
|
||||
switch (fci->size) {
|
||||
case sizeof(zend_fcall_info):
|
||||
break; /* nothing to do currently */
|
||||
@@ -669,6 +674,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
|
||||
fci->function_table = &(*ce)->function_table;
|
||||
calling_scope = *ce;
|
||||
} else {
|
||||
zend_error(E_NOTICE, "Non-callable array passed to zend_call_function()");
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (fci->function_table == NULL) {
|
||||
@@ -686,6 +694,14 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
}
|
||||
EX(function_state).function =
|
||||
Z_OBJ_HT_PP(fci->object_pp)->get_method(*fci->object_pp, Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name) TSRMLS_CC);
|
||||
if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
|
||||
if (zend_hash_find(&calling_scope->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function)==FAILURE) {
|
||||
efree(function_name_lc);
|
||||
zend_error(E_ERROR, "Cannot call method %s::%s() or method does not exist", calling_scope->name, Z_STRVAL_P(fci->function_name));
|
||||
}
|
||||
efree(function_name_lc);
|
||||
}
|
||||
} else if (calling_scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
|
||||
|
||||
@@ -807,7 +823,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
} else {
|
||||
severity = E_ERROR;
|
||||
}
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", calling_scope->name, EX(function_state).function->common.function_name);
|
||||
zend_error(severity, "Non-static method %s::%s() cannot be called statically", calling_scope->name, EX(function_state).function->common.function_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_compile.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
@@ -102,7 +102,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
int token_type;
|
||||
char *last_color = syntax_highlighter_ini->highlight_html;
|
||||
char *next_color;
|
||||
int in_string=0;
|
||||
int in_string=0, post_heredoc = 0;
|
||||
|
||||
zend_printf("<code>");
|
||||
zend_printf("<span style=\"color: %s\">\n", last_color);
|
||||
@@ -159,15 +159,14 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
switch (token_type) {
|
||||
case T_END_HEREDOC:
|
||||
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
|
||||
{
|
||||
char *ptr = LANG_SCNG(yy_text);
|
||||
if (ptr[LANG_SCNG(yy_leng) - 1] != ';') {
|
||||
zend_html_putc('\n');
|
||||
}
|
||||
}
|
||||
post_heredoc = 1;
|
||||
break;
|
||||
default:
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
|
||||
if (post_heredoc) {
|
||||
zend_html_putc('\n');
|
||||
post_heredoc = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_compile.h"
|
||||
#include "zend_indent.h"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <errno.h>
|
||||
#include "zend.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_ini_parser.h"
|
||||
#include <zend_ini_parser.h>
|
||||
#include "zend_ini_scanner.h"
|
||||
|
||||
#undef YYSTYPE
|
||||
@@ -53,13 +53,13 @@ static char *ini_filename;
|
||||
|
||||
void init_ini_scanner(TSRMLS_D)
|
||||
{
|
||||
SCNG(lineno)=1;
|
||||
SCNG(lineno)=1;
|
||||
}
|
||||
|
||||
|
||||
int zend_ini_scanner_get_lineno(TSRMLS_D)
|
||||
{
|
||||
return SCNG(lineno);
|
||||
return SCNG(lineno);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
return CFG_FALSE;
|
||||
}
|
||||
|
||||
<INITIAL>[[][^[]+[\]][ ]*{NEWLINE}? {
|
||||
<INITIAL>[[][^\]\n]+[\]][ ]*{NEWLINE}? {
|
||||
/* SECTION */
|
||||
|
||||
/* eat trailng and spaces ] */
|
||||
/* eat trailing ] and spaces */
|
||||
while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']' || yytext[yyleng-1]==' ')) {
|
||||
yyleng--;
|
||||
yytext[yyleng]=0;
|
||||
|
||||
+21
-8
@@ -21,6 +21,7 @@
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_interfaces.h"
|
||||
#include "zend_exceptions.h"
|
||||
|
||||
ZEND_API zend_class_entry *zend_ce_traversable;
|
||||
ZEND_API zend_class_entry *zend_ce_aggregate;
|
||||
@@ -35,6 +36,7 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
zend_fcall_info fci;
|
||||
zval z_fname;
|
||||
zval *retval;
|
||||
HashTable *function_table;
|
||||
|
||||
zval **params[2];
|
||||
|
||||
@@ -61,12 +63,17 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
|
||||
fcic.initialized = 1;
|
||||
if (!obj_ce) {
|
||||
obj_ce = Z_OBJCE_PP(object_pp);
|
||||
obj_ce = object_pp ? Z_OBJCE_PP(object_pp) : NULL;
|
||||
}
|
||||
if (obj_ce) {
|
||||
function_table = &obj_ce->function_table;
|
||||
} else {
|
||||
function_table = EG(function_table);
|
||||
}
|
||||
if (!fn_proxy || !*fn_proxy) {
|
||||
if (zend_hash_find(&obj_ce->function_table, function_name, function_name_len+1, (void **) &fcic.function_handler) == FAILURE) {
|
||||
if (zend_hash_find(function_table, function_name, function_name_len+1, (void **) &fcic.function_handler) == FAILURE) {
|
||||
/* error at c-level */
|
||||
zend_error(E_CORE_ERROR, "Couldn't find implementation for method %s::%s", obj_ce->name, function_name);
|
||||
zend_error(E_CORE_ERROR, "Couldn't find implementation for method %s%s%s", obj_ce ? obj_ce->name : "", obj_ce ? "::" : "", function_name);
|
||||
}
|
||||
if (fn_proxy) {
|
||||
*fn_proxy = fcic.function_handler;
|
||||
@@ -81,9 +88,9 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
if (result == FAILURE) {
|
||||
/* error at c-level */
|
||||
if (!obj_ce) {
|
||||
obj_ce = Z_OBJCE_PP(object_pp);
|
||||
obj_ce = object_pp ? Z_OBJCE_PP(object_pp) : NULL;
|
||||
}
|
||||
zend_error(E_CORE_ERROR, "Couldn't execute method %s::%s", obj_ce->name, function_name);
|
||||
zend_error(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? obj_ce->name : "", obj_ce ? "::" : "", function_name);
|
||||
}
|
||||
if (!retval_ptr_ptr) {
|
||||
if (retval) {
|
||||
@@ -270,11 +277,17 @@ static zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *ce,
|
||||
zval *iterator = zend_user_it_new_iterator(ce, object TSRMLS_CC);
|
||||
zend_object_iterator *new_iterator;
|
||||
|
||||
zend_class_entry *ce_it = Z_TYPE_P(iterator) == IS_OBJECT ? Z_OBJCE_P(iterator) : NULL;
|
||||
zend_class_entry *ce_it = iterator && Z_TYPE_P(iterator) == IS_OBJECT ? Z_OBJCE_P(iterator) : NULL;
|
||||
|
||||
if (!ce || !ce_it || !ce_it->get_iterator || (ce_it->get_iterator == zend_user_it_get_new_iterator && iterator == object)) {
|
||||
zend_error(E_WARNING, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce->name);
|
||||
zval_ptr_dtor(&iterator);
|
||||
if (!EG(exception))
|
||||
{
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce->name);
|
||||
}
|
||||
if (iterator)
|
||||
{
|
||||
zval_ptr_dtor(&iterator);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
new_iterator = ce_it->get_iterator(ce_it, iterator TSRMLS_CC);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <errno.h>
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_compile.h"
|
||||
#include "zend_language_scanner.h"
|
||||
#include "zend_highlight.h"
|
||||
@@ -128,11 +128,16 @@ void startup_scanner(TSRMLS_D)
|
||||
RESET_DOC_COMMENT();
|
||||
SCNG(yy_start_stack_ptr) = 0;
|
||||
SCNG(yy_start_stack_depth) = 0;
|
||||
SCNG(current_buffer) = NULL;
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
SCNG(script_org) = NULL;
|
||||
SCNG(script_org_size) = 0;
|
||||
SCNG(script_filtered) = NULL;
|
||||
SCNG(script_filtered_size) = 0;
|
||||
SCNG(input_filter) = NULL;
|
||||
SCNG(output_filter) = NULL;
|
||||
SCNG(script_encoding) = NULL;
|
||||
SCNG(internal_encoding) = NULL;
|
||||
#endif /* ZEND_MULTIBYTE */
|
||||
}
|
||||
|
||||
@@ -143,6 +148,10 @@ void shutdown_scanner(TSRMLS_D)
|
||||
efree(CG(heredoc));
|
||||
CG(heredoc_len)=0;
|
||||
}
|
||||
if (SCNG(yy_start_stack)) {
|
||||
yy_flex_free(SCNG(yy_start_stack));
|
||||
SCNG(yy_start_stack) = NULL;
|
||||
}
|
||||
RESET_DOC_COMMENT();
|
||||
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
@@ -154,6 +163,12 @@ void shutdown_scanner(TSRMLS_D)
|
||||
efree(SCNG(script_filtered));
|
||||
SCNG(script_filtered) = NULL;
|
||||
}
|
||||
SCNG(script_org_size) = 0;
|
||||
SCNG(script_filtered_size) = 0;
|
||||
SCNG(input_filter) = NULL;
|
||||
SCNG(output_filter) = NULL;
|
||||
SCNG(script_encoding) = NULL;
|
||||
SCNG(internal_encoding) = NULL;
|
||||
#endif /* ZEND_MULTIBYTE */
|
||||
}
|
||||
END_EXTERN_C()
|
||||
@@ -1161,6 +1176,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"}" {
|
||||
RESET_DOC_COMMENT();
|
||||
/* This is a temporary fix which is dependant on flex and it's implementation */
|
||||
if (yy_start_stack_ptr) {
|
||||
yy_pop_state(TSRMLS_C);
|
||||
|
||||
+2
-2
@@ -319,12 +319,12 @@ zend_mm_finished_searching_for_block:
|
||||
if (true_size > (heap->block_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_HEADER_SIZE)) {
|
||||
/* Make sure we add a memory block which is big enough */
|
||||
if (zend_mm_add_memory_block(heap, true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) {
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %d bytes!", true_size);
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %zd bytes!", true_size);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (zend_mm_add_memory_block(heap, heap->block_size)) {
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %d bytes!", heap->block_size);
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %zd bytes!", heap->block_size);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#define MODULES_H
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
|
||||
@@ -88,6 +89,7 @@ extern ZEND_API HashTable module_registry;
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC);
|
||||
int module_registry_request_startup(zend_module_entry *module TSRMLS_DC);
|
||||
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC);
|
||||
|
||||
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
|
||||
#endif
|
||||
|
||||
+42
-29
@@ -72,6 +72,7 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
|
||||
INIT_PZVAL(&__get_name);
|
||||
ZVAL_STRINGL(&__get_name, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1, 0);
|
||||
|
||||
SEPARATE_ARG_IF_REF(member);
|
||||
call_args[0] = &member;
|
||||
|
||||
/* go call the __get handler */
|
||||
@@ -87,11 +88,13 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
|
||||
retval returns the value that is received
|
||||
*/
|
||||
|
||||
|
||||
if (call_result == FAILURE) {
|
||||
zend_error(E_ERROR, "Could not call __get handler for class %s", Z_OBJCE_P(object)->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&member);
|
||||
|
||||
if (retval) {
|
||||
retval->refcount--;
|
||||
}
|
||||
@@ -105,7 +108,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
zval *retval = NULL;
|
||||
zval __set_name;
|
||||
int call_result;
|
||||
int ret;
|
||||
int result;
|
||||
|
||||
/* __set handler is called with two arguments:
|
||||
property name
|
||||
@@ -116,6 +119,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
INIT_PZVAL(&__set_name);
|
||||
ZVAL_STRINGL(&__set_name, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1, 0);
|
||||
|
||||
SEPARATE_ARG_IF_REF(member);
|
||||
call_args[0] = &member;
|
||||
value->refcount++;
|
||||
call_args[1] = &value;
|
||||
@@ -139,19 +143,16 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&member);
|
||||
zval_ptr_dtor(&value);
|
||||
|
||||
if (retval && zend_is_true(retval)) {
|
||||
ret = SUCCESS;
|
||||
} else {
|
||||
ret = FAILURE;
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
result = i_zend_is_true(retval) ? SUCCESS : FAILURE;
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -383,12 +384,14 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
if(offset == NULL) {
|
||||
/* [] construct */
|
||||
zval offset_null;
|
||||
INIT_ZVAL(offset_null);
|
||||
offset = &offset_null;
|
||||
ALLOC_INIT_ZVAL(offset);
|
||||
} else {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
}
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
|
||||
|
||||
zval_ptr_dtor(&offset);
|
||||
|
||||
if (!retval) {
|
||||
if (!EG(exception)) {
|
||||
zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
||||
@@ -410,14 +413,15 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
|
||||
static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
|
||||
{
|
||||
zend_class_entry *ce = Z_OBJCE_P(object);
|
||||
zval tmp;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
if (!offset) {
|
||||
INIT_ZVAL(tmp);
|
||||
offset = &tmp;
|
||||
ALLOC_INIT_ZVAL(offset);
|
||||
} else {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
}
|
||||
zend_call_method_with_2_params(&object, ce, NULL, "offsetset", NULL, offset, value);
|
||||
zval_ptr_dtor(&offset);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
}
|
||||
@@ -431,10 +435,16 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
|
||||
int result;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset);
|
||||
result = i_zend_is_true(retval);
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
zval_ptr_dtor(&offset);
|
||||
if (retval) {
|
||||
result = i_zend_is_true(retval);
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
return 0;
|
||||
@@ -513,11 +523,11 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
|
||||
static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC)
|
||||
{
|
||||
zend_class_entry *ce = Z_OBJCE_P(object);
|
||||
zval *retval;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", &retval, offset);
|
||||
zval_ptr_dtor(&retval);
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset);
|
||||
zval_ptr_dtor(&offset);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
}
|
||||
@@ -528,7 +538,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
{
|
||||
zval ***args;
|
||||
zend_internal_function *func = (zend_internal_function *)EG(function_state_ptr)->function;
|
||||
zval method_name, method_args, __call_name;
|
||||
zval __call_name;
|
||||
zval *method_name_ptr, *method_args_ptr;
|
||||
zval **call_args[2];
|
||||
zval *method_result_ptr = NULL;
|
||||
@@ -542,11 +552,11 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
method_name_ptr = &method_name;
|
||||
ALLOC_ZVAL(method_name_ptr);
|
||||
INIT_PZVAL(method_name_ptr);
|
||||
ZVAL_STRING(method_name_ptr, func->function_name, 0); /* no dup - it's a copy */
|
||||
|
||||
method_args_ptr = &method_args;
|
||||
ALLOC_ZVAL(method_args_ptr);
|
||||
INIT_PZVAL(method_args_ptr);
|
||||
array_init(method_args_ptr);
|
||||
|
||||
@@ -591,8 +601,8 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
}
|
||||
|
||||
/* now destruct all auxiliaries */
|
||||
zval_dtor(method_args_ptr);
|
||||
zval_dtor(method_name_ptr);
|
||||
zval_ptr_dtor(&method_args_ptr);
|
||||
zval_ptr_dtor(&method_name_ptr);
|
||||
|
||||
/* destruct the function also, then - we have allocated it in get_method */
|
||||
efree(func);
|
||||
@@ -602,7 +612,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
* Returns the function address that should be called, or NULL
|
||||
* if no such function exists.
|
||||
*/
|
||||
inline zend_function *zend_check_private(zend_function *fbc, zend_class_entry *ce, int fn_flags, char *function_name_strval, int function_name_strlen TSRMLS_DC)
|
||||
static inline zend_function *zend_check_private(zend_function *fbc, zend_class_entry *ce, int fn_flags, char *function_name_strval, int function_name_strlen TSRMLS_DC)
|
||||
{
|
||||
if (!ce) {
|
||||
return 0;
|
||||
@@ -788,7 +798,10 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *propert
|
||||
#endif
|
||||
|
||||
if (!zend_verify_property_access(property_info, ce TSRMLS_CC)) {
|
||||
zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
|
||||
if (!silent) {
|
||||
zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
zend_hash_quick_find(tmp_ce->static_members, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval);
|
||||
|
||||
@@ -88,7 +88,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
|
||||
*lval = local_lval;
|
||||
}
|
||||
return IS_LONG;
|
||||
} else if (end_ptr_long == str && *end_ptr_long != '\0' && *str != '.') { /* ignore partial string matches */
|
||||
} else if (end_ptr_long == str && *end_ptr_long != '\0' && *str != '.' && *str != '-') { /* ignore partial string matches */
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
+14
-14
@@ -623,7 +623,7 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
|
||||
string_printf(str, "protected ");
|
||||
break;
|
||||
default:
|
||||
string_printf(str, "<visibilty error> ");
|
||||
string_printf(str, "<visibility error> ");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1843,7 +1843,7 @@ ZEND_METHOD(reflection_method, __toString)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args)
|
||||
Invokes the function. Pass a */
|
||||
Invokes the method. */
|
||||
ZEND_METHOD(reflection_method, invoke)
|
||||
{
|
||||
zval *retval_ptr;
|
||||
@@ -1860,7 +1860,7 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
METHOD_NOTSTATIC;
|
||||
|
||||
if (argc < 1) {
|
||||
zend_error(E_WARNING, "%s expects at least one parameter, none given", get_active_function_name(TSRMLS_C));
|
||||
zend_error(E_WARNING, "Invoke() expects at least one parameter, none given");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1870,11 +1870,11 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
(mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Trying to invoke abstract method %s::%s",
|
||||
"Trying to invoke abstract method %s::%s()",
|
||||
mptr->common.scope->name, mptr->common.function_name);
|
||||
} else {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Trying to invoke %s method %s::%s from scope %s",
|
||||
"Trying to invoke %s method %s::%s() from scope %s",
|
||||
mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private",
|
||||
mptr->common.scope->name, mptr->common.function_name,
|
||||
Z_OBJCE_P(getThis())->name);
|
||||
@@ -2018,7 +2018,7 @@ ZEND_METHOD(reflection_method, isDestructor)
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(mptr);
|
||||
RETURN_BOOL(mptr->common.fn_flags && ZEND_ACC_DTOR);
|
||||
RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2128,11 +2128,7 @@ ZEND_METHOD(reflection_class, getStaticProperties)
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
|
||||
if (!ce->constants_updated) {
|
||||
zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(ce->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
ce->constants_updated = 1;
|
||||
}
|
||||
zend_update_class_constants(ce TSRMLS_CC);
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
@@ -2151,6 +2147,8 @@ ZEND_METHOD(reflection_class, getDefaultProperties)
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
array_init(return_value);
|
||||
|
||||
zend_update_class_constants(ce TSRMLS_CC);
|
||||
|
||||
count = zend_hash_num_elements(&ce->default_properties);
|
||||
if (count > 0) {
|
||||
HashPosition pos;
|
||||
@@ -2867,7 +2865,7 @@ ZEND_METHOD(reflection_property, export)
|
||||
ZEND_METHOD(reflection_property, __construct)
|
||||
{
|
||||
zval *propname, *classname;
|
||||
char *name_str;
|
||||
char *name_str, *class_name, *prop_name;
|
||||
int name_len;
|
||||
zval *object;
|
||||
reflection_object *intern;
|
||||
@@ -2932,8 +2930,9 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
ZVAL_STRINGL(classname, ce->name, ce->name_length, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL);
|
||||
|
||||
zend_unmangle_property_name(property_info->name, &class_name, &prop_name);
|
||||
MAKE_STD_ZVAL(propname);
|
||||
ZVAL_STRING(propname, property_info->name, 1);
|
||||
ZVAL_STRING(propname, prop_name, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &propname, sizeof(zval *), NULL);
|
||||
|
||||
reference = (property_reference*) emalloc(sizeof(property_reference));
|
||||
@@ -3052,6 +3051,7 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
}
|
||||
|
||||
if ((ref->prop->flags & ZEND_ACC_STATIC)) {
|
||||
zend_update_class_constants(intern->ce TSRMLS_CC);
|
||||
if (zend_hash_quick_find(intern->ce->static_members, ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
@@ -3348,7 +3348,7 @@ static int add_extension_class(zend_class_entry **pce, int num_args, va_list arg
|
||||
zend_reflection_class_factory(*pce, zclass TSRMLS_CC);
|
||||
add_assoc_zval_ex(class_array, (*pce)->name, (*pce)->name_length + 1, zclass);
|
||||
} else {
|
||||
add_next_index_stringl(class_array, (*pce)->name, (*pce)->name_length + 1, 1);
|
||||
add_next_index_stringl(class_array, (*pce)->name, (*pce)->name_length, 1);
|
||||
}
|
||||
}
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
|
||||
+1
-2
@@ -79,11 +79,10 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
/* promote to stream */
|
||||
/* make compatible with stream */
|
||||
file_handle->handle.stream.handle = file_handle->handle.fp;
|
||||
file_handle->handle.stream.reader = zend_stream_stdio_reader;
|
||||
file_handle->handle.stream.closer = zend_stream_stdio_closer;
|
||||
file_handle->type = ZEND_HANDLE_STREAM;
|
||||
|
||||
file_handle->handle.stream.interactive = isatty(fileno((FILE *)file_handle->handle.stream.handle));
|
||||
}
|
||||
|
||||
+28
-17
@@ -91,22 +91,37 @@
|
||||
|
||||
#include <zend_strtod.h>
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
|
||||
defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
|
||||
defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \
|
||||
defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) && \
|
||||
defined(__VFP_FP__))
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
#include <inttypes.h>
|
||||
#elif defined(HAVE_STDINT_H)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INT32_T
|
||||
# if SIZEOF_INT == 4
|
||||
typedef int int32_t;
|
||||
# elif SIZEOF_LONG == 4
|
||||
typedef long int int32_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT32_T
|
||||
# if SIZEOF_INT == 4
|
||||
typedef unsigned int uint32_t;
|
||||
# elif SIZEOF_LONG == 4
|
||||
typedef unsigned long int uint32_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define IEEE_BIG_ENDIAN
|
||||
#else
|
||||
#define IEEE_LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__arm__) && !defined(__VFP_FP__)
|
||||
/*
|
||||
@@ -123,16 +138,12 @@ static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define int32_t __int32
|
||||
#define u_int32_t unsigned __int32
|
||||
#define uint32_t unsigned __int32
|
||||
#define IEEE_LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(__sparc__) || defined(__ppc__)
|
||||
#define u_int32_t uint32_t
|
||||
#endif
|
||||
|
||||
#define Long int32_t
|
||||
#define ULong u_int32_t
|
||||
#define ULong uint32_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "malloc.h"
|
||||
|
||||
+160
-19
@@ -16,7 +16,7 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
|
||||
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_RE2C,[
|
||||
AC_DEFUN([PHP_PROG_RE2C],[
|
||||
AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
|
||||
])
|
||||
|
||||
@@ -29,9 +29,23 @@ AC_DEFUN([PHP_DEFINE],[
|
||||
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
|
||||
])
|
||||
|
||||
dnl PHP_CANONICAL_HOST
|
||||
dnl
|
||||
AC_DEFUN([PHP_CANONICAL_HOST],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
dnl Make sure we do not continue if host_alias is empty.
|
||||
if test -z "$host_alias" && test -n "$host"; then
|
||||
host_alias=$host
|
||||
fi
|
||||
if test -z "$host_alias"; then
|
||||
AC_MSG_ERROR([host_alias is not set!])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl PHP_INIT_BUILD_SYSTEM
|
||||
dnl
|
||||
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
|
||||
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
|
||||
test -d include || mkdir include
|
||||
> Makefile.objects
|
||||
> Makefile.fragments
|
||||
@@ -273,6 +287,7 @@ int readdir_r(DIR *, struct dirent *);
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[
|
||||
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
|
||||
PHP_SUBST(SHLIB_SUFFIX_NAME)
|
||||
SHLIB_SUFFIX_NAME=so
|
||||
case $host_alias in
|
||||
@@ -771,12 +786,17 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
|
||||
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
|
||||
php_cxx_post=' && echo > $[@]'
|
||||
php_lo=o
|
||||
|
||||
|
||||
case $with_pic in
|
||||
yes) pic_setting='-prefer-pic';;
|
||||
no) pic_setting='-prefer-non-pic';;
|
||||
esac
|
||||
|
||||
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
|
||||
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
|
||||
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
|
||||
shared_c_post=
|
||||
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
|
||||
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
|
||||
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
|
||||
shared_cxx_post=
|
||||
shared_lo=lo
|
||||
|
||||
@@ -1156,14 +1176,26 @@ dnl from object_var in build-dir.
|
||||
dnl
|
||||
AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
install_modules="install-modules"
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
|
||||
|
||||
case $host_alias in
|
||||
*darwin*[)]
|
||||
suffix=so
|
||||
link_cmd='ifelse($4,,[$(CC)],[$(CXX)]) -dynamic -flat_namespace -bundle -undefined suppress $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
|
||||
;;
|
||||
*[)]
|
||||
suffix=la
|
||||
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
|
||||
PHP_SUBST($2)
|
||||
cat >>Makefile.objects<<EOF
|
||||
\$(phplibdir)/$1.la: $3/$1.la
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
|
||||
\$(phplibdir)/$1.$suffix: $3/$1.$suffix
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
|
||||
|
||||
$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
|
||||
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
$link_cmd
|
||||
|
||||
EOF
|
||||
])
|
||||
@@ -1555,7 +1587,7 @@ AC_DEFUN([PHP_CHECK_LIBRARY], [
|
||||
],[
|
||||
LDFLAGS=$save_old_LDFLAGS
|
||||
ext_shared=$save_ext_shared
|
||||
unset ac_cv_func_$1
|
||||
unset ac_cv_lib_$1[]_$2
|
||||
$4
|
||||
])dnl
|
||||
])
|
||||
@@ -1580,6 +1612,64 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for kerberos
|
||||
dnl
|
||||
AC_DEFUN([PHP_SETUP_KERBEROS],[
|
||||
found_kerberos=no
|
||||
unset KERBEROS_CFLAGS
|
||||
unset KERBEROS_LIBS
|
||||
|
||||
dnl First try to find krb5-config
|
||||
if test -z "$KRB5_CONFIG"; then
|
||||
AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
|
||||
fi
|
||||
|
||||
dnl If krb5-config is found try using it
|
||||
if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
|
||||
KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
|
||||
KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
|
||||
|
||||
if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
|
||||
found_kerberos=yes
|
||||
PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If still not found use old skool method
|
||||
if test "$found_kerberos" = "no"; then
|
||||
|
||||
if test "$PHP_KERBEROS" = "yes"; then
|
||||
PHP_KERBEROS="/usr/kerberos /usr/local /usr"
|
||||
fi
|
||||
|
||||
for i in $PHP_KERBEROS; do
|
||||
if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
|
||||
PHP_KERBEROS_DIR=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$PHP_KERBEROS_DIR"; then
|
||||
found_kerberos=yes
|
||||
PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
|
||||
PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
|
||||
PHP_ADD_LIBRARY(krb5, 1, $1)
|
||||
PHP_ADD_LIBRARY(k5crypto, 1, $1)
|
||||
PHP_ADD_LIBRARY(com_err, 1, $1)
|
||||
PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$found_kerberos" = "yes"; then
|
||||
ifelse([$2],[],:,[$2])
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
@@ -1590,13 +1680,20 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
unset OPENSSL_INCDIR
|
||||
unset OPENSSL_LIBDIR
|
||||
|
||||
dnl Fallbacks for different configure options
|
||||
if test "$PHP_OPENSSL" != "no"; then
|
||||
PHP_OPENSSL_DIR=$PHP_OPENSSL
|
||||
elif test "$PHP_IMAP_SSL" != "no"; then
|
||||
PHP_OPENSSL_DIR=$PHP_IMAP_SSL
|
||||
fi
|
||||
|
||||
dnl First try to find pkg-config
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
|
||||
if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
|
||||
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
|
||||
found_openssl=yes
|
||||
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
|
||||
@@ -1610,15 +1707,16 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($OPENSSL_INCS)
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$found_openssl" = "no"; then
|
||||
|
||||
if test "$PHP_OPENSSL_DIR" = "yes"; then
|
||||
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
for i in $PHP_OPENSSL_DIR; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_INCDIR=$i/include
|
||||
fi
|
||||
@@ -1676,11 +1774,11 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
|
||||
fi
|
||||
|
||||
if test "$found_openssl" = "yes"; then
|
||||
dnl For apache 1.3.x static build
|
||||
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
|
||||
AC_SUBST(OPENSSL_INCDIR_OPT)
|
||||
|
||||
if test "$found_openssl" = "yes"; then
|
||||
ifelse([$2],[],:,[$2])
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
@@ -1699,9 +1797,13 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
test -d ext || mkdir ext
|
||||
test -d ext/iconv || mkdir ext/iconv
|
||||
|
||||
echo > ext/iconv/php_have_bsd_iconv.h
|
||||
echo > ext/iconv/php_have_glibc_iconv.h
|
||||
echo > ext/iconv/php_have_libiconv.h
|
||||
echo > ext/iconv/php_have_iconv.h
|
||||
echo > ext/iconv/php_php_iconv_impl.h
|
||||
echo > ext/iconv/php_php_iconv_h_path.h
|
||||
echo > ext/iconv/php_iconv_supports_errno.h
|
||||
|
||||
dnl
|
||||
dnl Check libc first if no path is provided in --with-iconv
|
||||
@@ -1908,7 +2010,7 @@ dnl
|
||||
dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
|
||||
dnl This macro checks whether build works and given function exists.
|
||||
dnl
|
||||
AC_DEFUN(PHP_TEST_BUILD, [
|
||||
AC_DEFUN([PHP_TEST_BUILD], [
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$4 $LIBS"
|
||||
AC_TRY_RUN([
|
||||
@@ -1928,3 +2030,42 @@ AC_DEFUN(PHP_TEST_BUILD, [
|
||||
LIBS=$old_LIBS
|
||||
])
|
||||
])
|
||||
|
||||
dnl This macro is currently a placeholder in the config.m4 file
|
||||
dnl it is scanned by genif.sh when it builds the internal functions
|
||||
dnl list, so that modules can be init'd in the correct order
|
||||
dnl $1 = name of extension, $2 = extension upon which it depends
|
||||
dnl $3 = optional: if true, it's ok for $2 to have not been configured
|
||||
dnl default is false and should halt the build.
|
||||
dnl See ADD_EXTENSION_DEP in win32 build
|
||||
AC_DEFUN([PHP_ADD_EXTENSION_DEP], [])
|
||||
|
||||
|
||||
dnl
|
||||
dnl PHP_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([PHP_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])
|
||||
|
||||
+5
-9
@@ -32,6 +32,7 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
targets = $(TOUCH_FILES) configure $(config_h_in)
|
||||
|
||||
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
|
||||
|
||||
all: $(targets)
|
||||
|
||||
@@ -39,26 +40,21 @@ acconfig.h: $(acconfig_h_SOURCES)
|
||||
@echo rebuilding $@
|
||||
cat $(acconfig_h_SOURCES) > $@
|
||||
|
||||
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times)'||true)
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
autoheader $(SUPPRESS_WARNINGS)
|
||||
|
||||
$(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
@echo rebuilding $@
|
||||
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
|
||||
$$libtoolize --copy --automake; \
|
||||
ltpath=`dirname $$libtoolize`; \
|
||||
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
|
||||
cat acinclude.m4 $$ltfile > $@
|
||||
cat acinclude.m4 ./build/libtool.m4 > $@
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
autoconf $(SUPPRESS_WARNINGS)
|
||||
|
||||
+1
-40
@@ -16,7 +16,7 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.30 2004-01-08 17:31:49 sniper Exp $
|
||||
# $Id: buildcheck.sh,v 1.30.2.4 2005-01-20 01:41:52 sniper Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
@@ -41,7 +41,6 @@ else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
|
||||
|
||||
if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
echo "buildconf: Your version of autoconf likely contains buggy cache code."
|
||||
echo " Running cvsclean for you."
|
||||
@@ -50,44 +49,6 @@ if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
stamp=
|
||||
fi
|
||||
|
||||
# libtoolize 1.4.3 or newer
|
||||
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
|
||||
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
|
||||
lt_pversion=`$libtoolize --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'`
|
||||
if test "$lt_pversion" = ""; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version 1.4.3 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $lt_pversion; IFS=' '
|
||||
|
||||
if test "$3" = ""; then
|
||||
third=0
|
||||
else
|
||||
third=$3
|
||||
fi
|
||||
|
||||
if test "$1" -gt "1" || test "$2" -ge "5" || (test "$2" -ge "4" && test "$third" -ge "3")
|
||||
then
|
||||
echo "buildconf: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
echo "buildconf: libtool version $lt_pversion found."
|
||||
echo " You need libtool version 1.4.3 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'`
|
||||
ltfile="$ltpath/share/aclocal/libtool.m4"
|
||||
if test -r "$ltfile"; then
|
||||
:
|
||||
else
|
||||
echo "buildconf: $ltfile does not exist."
|
||||
echo " Please reinstall libtool."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -n "$stamp" && touch $stamp
|
||||
|
||||
exit 0
|
||||
Vendored
+3713
File diff suppressed because it is too large.
Load diff
@@ -12,6 +12,7 @@ case "$EXTRA_VERSION" in
|
||||
esac
|
||||
|
||||
devok=0
|
||||
debug=no
|
||||
|
||||
while test $# -gt 0; do
|
||||
if test "$1" = "--copy"; then
|
||||
@@ -23,6 +24,10 @@ while test $# -gt 0; do
|
||||
echo "Forcing buildconf"
|
||||
fi
|
||||
|
||||
if test "$1" = "--debug"; then
|
||||
debug=yes
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
@@ -48,17 +53,21 @@ if test -z "$ZENDDIR"; then
|
||||
fi
|
||||
else
|
||||
if test -r "Zend/zend_execute_globals.h"; then
|
||||
:
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine2 2>/dev/null
|
||||
mv ZendEngine1 Zend
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ZENDDIR=Zend
|
||||
echo "using default Zend directory"
|
||||
fi
|
||||
|
||||
rm -f generated_lists
|
||||
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
|
||||
if test "$debug" = "yes"; then
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
|
||||
else
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
|
||||
fi
|
||||
Vendored
+99
-53
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-10-21'
|
||||
timestamp='2003-01-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -98,14 +98,17 @@ trap 'exit 1' 1 2 15
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# This shell variable is my proudest work .. or something. --bje
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
|
||||
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|
||||
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
|
||||
dummy=$tmpdir/dummy ;
|
||||
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
@@ -113,15 +116,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $files ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac ;
|
||||
unset files'
|
||||
esac ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
@@ -178,7 +179,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
@@ -223,6 +235,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:MicroBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
@@ -286,7 +301,6 @@ EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
@@ -439,8 +453,7 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
&& exit 0
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
@@ -449,7 +462,7 @@ EOF
|
||||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS)
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
@@ -524,8 +537,7 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@@ -624,10 +636,20 @@ EOF
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
@@ -661,8 +683,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@@ -720,15 +741,15 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
@@ -756,7 +777,6 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
@@ -769,13 +789,16 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i386-pc-interix3
|
||||
echo i586-pc-interix3
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
echo i586-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
@@ -818,8 +841,26 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
@@ -914,7 +955,6 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
@@ -932,6 +972,23 @@ EOF
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
@@ -966,9 +1023,6 @@ 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
|
||||
@@ -995,9 +1049,12 @@ EOF
|
||||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1014,9 +1071,6 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -1098,7 +1152,11 @@ EOF
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
case `uname -p` in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
@@ -1134,11 +1192,6 @@ EOF
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
@@ -1157,12 +1210,6 @@ EOF
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1283,8 +1330,7 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
||||
Vendored
+21
-22
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-09-05'
|
||||
timestamp='2003-01-03'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -118,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -245,16 +245,19 @@ case $basic_machine in
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
@@ -315,16 +318,19 @@ case $basic_machine in
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39 | mipstx39el \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
@@ -716,6 +722,10 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
@@ -812,12 +822,6 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -901,10 +905,6 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3d)
|
||||
basic_machine=alpha-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
@@ -977,10 +977,6 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
@@ -1113,11 +1109,12 @@ case $os in
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -microbsd*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1129,8 +1126,10 @@ case $os in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
|
||||
+64
-33
@@ -35,20 +35,20 @@ for arg in $0 "$@"; do
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
|
||||
done
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
PHP_CANONICAL_HOST
|
||||
AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
MAJOR_VERSION=5
|
||||
MINOR_VERSION=0
|
||||
RELEASE_VERSION=3
|
||||
EXTRA_VERSION="RC2"
|
||||
RELEASE_VERSION=4
|
||||
EXTRA_VERSION=""
|
||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
|
||||
|
||||
dnl Define where extension directories are located in the configure context
|
||||
AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1])dnl
|
||||
AC_DEFUN(PHP_EXT_DIR,[ext/$1])dnl
|
||||
AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1])dnl
|
||||
AC_DEFUN(PHP_ALWAYS_SHARED,[])dnl
|
||||
AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
|
||||
AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
|
||||
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
|
||||
AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
|
||||
|
||||
dnl Setting up the PHP version based on the information above.
|
||||
dnl -------------------------------------------------------------------------
|
||||
@@ -81,7 +81,11 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
|
||||
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
|
||||
fi
|
||||
|
||||
if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
|
||||
AC_MSG_ERROR([--with-apxs2filter and --with-apxs2 cannot be used together])
|
||||
fi
|
||||
|
||||
|
||||
dnl Settings we want to make before the checks.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -128,7 +132,6 @@ dnl check for -R, etc. switch
|
||||
PHP_RUNPATH_SWITCH
|
||||
|
||||
PHP_PROG_RE2C
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_AWK
|
||||
AC_PROG_YACC
|
||||
@@ -170,14 +173,13 @@ else
|
||||
AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.)
|
||||
fi
|
||||
|
||||
dnl Check whether byte ordering is bigendian
|
||||
PHP_C_BIGENDIAN
|
||||
|
||||
|
||||
dnl Platform-specific compile settings.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl if host_alias is empty, ac_cv_host_alias may still have the info
|
||||
if test -z "$host_alias"; then
|
||||
host_alias=$ac_cv_host_alias
|
||||
fi
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
@@ -196,6 +198,34 @@ case $host_alias in
|
||||
LIBS="$LIBS -lbe -lroot";;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
|
||||
*hpux*)
|
||||
if test "$GCC" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
||||
fi
|
||||
;;
|
||||
*netware*)
|
||||
PHP_OS="NetWare"
|
||||
PHP_UNAME="NetWare"
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[hardcode for each of the cross compiler host])
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
|
||||
PHP_BUILD_PROGRAM
|
||||
PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS,php)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Disable PIC mode by default where it is known to be safe to do so,
|
||||
# to avoid the performance hit from the lost register
|
||||
AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
|
||||
case $host_alias in
|
||||
i?86-*-linux*|i?86-*-freebsd*)
|
||||
if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
|
||||
with_pic=no
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -278,7 +308,6 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
|
||||
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
|
||||
|
||||
|
||||
@@ -323,6 +352,8 @@ AC_HEADER_DIRENT
|
||||
PHP_MISSING_FCLOSE_DECL
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS([ \
|
||||
inttypes.h \
|
||||
stdint.h \
|
||||
dirent.h \
|
||||
ApplicationServices/ApplicationServices.h \
|
||||
sys/param.h \
|
||||
@@ -842,7 +873,6 @@ fi
|
||||
|
||||
enable_shared=yes
|
||||
enable_static=yes
|
||||
unset with_pic
|
||||
|
||||
case $php_build_target in
|
||||
program|static)
|
||||
@@ -853,7 +883,10 @@ program|static)
|
||||
;;
|
||||
shared)
|
||||
enable_static=no
|
||||
standard_libtool_flag=-prefer-pic
|
||||
case $with_pic in
|
||||
yes) standard_libtool_flag='-prefer-pic';;
|
||||
no) standard_libtool_flag='-prefer-non-pic';;
|
||||
esac
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
|
||||
;;
|
||||
esac
|
||||
@@ -879,6 +912,11 @@ if test -z "$with_pear" && test "$enable_pear" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
# If CLI is disabled -> disable PEAR
|
||||
if test "$PHP_SAPI_CLI" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(pear, [whether to install PEAR],
|
||||
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
|
||||
--without-pear Do not install PEAR], DEFAULT, yes)
|
||||
@@ -888,17 +926,13 @@ if test "$PHP_PEAR" != "no"; then
|
||||
dnl
|
||||
dnl PEAR dependancies
|
||||
dnl
|
||||
if test "$PHP_SAPI_CLI" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires CLI to be enabled. Add --enable-cli to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
if test "$PHP_PCRE_REGEX" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --disable-pear)"
|
||||
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --without-pear)"
|
||||
fi
|
||||
if test "$PHP_XML" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --disable-pear)"
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)"
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -906,7 +940,7 @@ dnl ext/xmlrpc is not really there yet to be a requirement..
|
||||
dnl
|
||||
dnl if test "$PHP_XMLRPC" = "no"; then
|
||||
dnl pear_error_msg="$pear_error_msg
|
||||
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --disable-pear)"
|
||||
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --without-pear)"
|
||||
dnl fi
|
||||
dnl
|
||||
|
||||
@@ -923,6 +957,8 @@ dnl
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
esac
|
||||
fi
|
||||
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
|
||||
fi
|
||||
|
||||
|
||||
@@ -936,10 +972,6 @@ LIBZEND_BASIC_CHECKS
|
||||
LIBZEND_DLSYM_CHECK
|
||||
LIBZEND_OTHER_CHECKS
|
||||
|
||||
TSRM_LIB='TSRM/libtsrm.la'
|
||||
TSRM_DIR=TSRM
|
||||
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/TSRM"
|
||||
|
||||
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
PHP_THREAD_SAFETY=yes
|
||||
@@ -947,6 +979,9 @@ else
|
||||
PHP_THREAD_SAFETY=no
|
||||
fi
|
||||
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
|
||||
|
||||
if test "$abs_srcdir" != "$abs_builddir"; then
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
|
||||
@@ -1119,7 +1154,6 @@ PHP_SUBST(CXXFLAGS)
|
||||
PHP_SUBST(CXXFLAGS_CLEAN)
|
||||
PHP_SUBST(CXX_PHP_COMPILE)
|
||||
PHP_SUBST_OLD(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEFS)
|
||||
PHP_SUBST_OLD(EXTENSION_DIR)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
|
||||
@@ -1148,8 +1182,6 @@ PHP_SUBST(PROG_SENDMAIL)
|
||||
PHP_SUBST(RE2C)
|
||||
PHP_SUBST(SHELL)
|
||||
PHP_SUBST(SHARED_LIBTOOL)
|
||||
PHP_SUBST(TSRM_DIR)
|
||||
PHP_SUBST(TSRM_LIB)
|
||||
PHP_SUBST(WARNING_LEVEL)
|
||||
PHP_SUBST(PHP_FRAMEWORKS)
|
||||
PHP_SUBST(PHP_FRAMEWORKPATH)
|
||||
@@ -1272,7 +1304,6 @@ PHP_ADD_BUILD_DIR(TSRM)
|
||||
PHP_ADD_BUILD_DIR(Zend)
|
||||
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
|
||||
|
||||
PHP_GEN_BUILD_DIRS
|
||||
@@ -1298,12 +1329,12 @@ fi
|
||||
#
|
||||
|
||||
test -d TSRM || $php_shtool mkdir TSRM
|
||||
echo '#include "../main/php_config.h"' > TSRM/tsrm_config.h
|
||||
echo '#include <../main/php_config.h>' > TSRM/tsrm_config.h
|
||||
|
||||
test -d Zend || $php_shtool mkdir Zend
|
||||
|
||||
cat >Zend/zend_config.h <<FEO
|
||||
#include "../main/php_config.h"
|
||||
#include <../main/php_config.h>
|
||||
#if defined(APACHE) && defined(PHP_API_VERSION)
|
||||
#undef HAVE_DLFCN_H
|
||||
#endif
|
||||
|
||||
Vendored
+4
-4
@@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE.
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
@@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
@@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
@@ -104,7 +104,7 @@ AC_SUBST($1)])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
AC_DEFUN([AM_CONFIG_HEADER],
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#elif defined(NETWARE)
|
||||
#include "config.nw.h"
|
||||
#else
|
||||
#include "php_config.h"
|
||||
#include <php_config.h>
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
|
||||
+2
-2
@@ -185,7 +185,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
|
||||
if (bz_file == NULL) {
|
||||
/* that didn't work, so try and get something from the network/wrapper */
|
||||
stream = php_stream_open_wrapper(path, mode, options, opened_path);
|
||||
stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
|
||||
|
||||
if (stream) {
|
||||
int fd;
|
||||
@@ -196,7 +196,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
|
||||
* failed.
|
||||
*/
|
||||
if (!bz_file && mode[0] == 'w') {
|
||||
if (opened_path && !bz_file && mode[0] == 'w') {
|
||||
VCWD_UNLINK(*opened_path);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-6
@@ -1,6 +1,6 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_DEFUN(CPDF_JPEG_TEST,[
|
||||
AC_DEFUN([CPDF_JPEG_TEST],[
|
||||
AC_ARG_WITH(jpeg-dir,
|
||||
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN(CPDF_JPEG_TEST,[
|
||||
],)
|
||||
])
|
||||
|
||||
AC_DEFUN(CPDF_TIFF_TEST,[
|
||||
AC_DEFUN([CPDF_TIFF_TEST],[
|
||||
AC_ARG_WITH(tiff-dir,
|
||||
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
@@ -58,14 +58,22 @@ if test "$PHP_CPDFLIB" != "no"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
|
||||
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
cpdf_libname=cpdf
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
|
||||
cpdf_libname=cpdfm
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($cpdf_libname, $i/lib, CPDF_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@ if test "$PHP_CURL" != "no"; then
|
||||
CURL_CONFIG="curl-config"
|
||||
AC_MSG_CHECKING(for cURL 7.10.5 or greater)
|
||||
|
||||
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
|
||||
if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
|
||||
CURL_CONFIG=${CURL_DIR}/bin/curl-config
|
||||
else
|
||||
if ${CURL_DIR}/curl-config --libs print > /dev/null 2>&1; then
|
||||
if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then
|
||||
CURL_CONFIG=${CURL_DIR}/curl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
+39
-6
@@ -49,6 +49,7 @@
|
||||
#include "ext/standard/php_smart_str.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "ext/standard/file.h"
|
||||
#include "ext/standard/url.h"
|
||||
#include "php_curl.h"
|
||||
|
||||
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
@@ -60,6 +61,26 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) v, 1);
|
||||
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
|
||||
|
||||
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
|
||||
if (PG(open_basedir) && *PG(open_basedir) && \
|
||||
strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
|
||||
{ \
|
||||
php_url *tmp_url; \
|
||||
\
|
||||
if (!(tmp_url = php_url_parse_ex(str, len))) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid url '%s'", str); \
|
||||
RETURN_FALSE; \
|
||||
} \
|
||||
\
|
||||
if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
|
||||
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
|
||||
) { \
|
||||
php_url_free(tmp_url); \
|
||||
RETURN_FALSE; \
|
||||
} \
|
||||
php_url_free(tmp_url); \
|
||||
}
|
||||
|
||||
/* {{{ curl_functions[]
|
||||
*/
|
||||
function_entry curl_functions[] = {
|
||||
@@ -773,6 +794,11 @@ PHP_FUNCTION(curl_init)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if (argc > 0) {
|
||||
convert_to_string_ex(url);
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
|
||||
}
|
||||
|
||||
cp = curl_easy_init();
|
||||
if (!cp) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not initialize a new cURL handle");
|
||||
@@ -809,7 +835,6 @@ PHP_FUNCTION(curl_init)
|
||||
|
||||
if (argc > 0) {
|
||||
char *urlcopy;
|
||||
convert_to_string_ex(url);
|
||||
|
||||
urlcopy = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
|
||||
curl_easy_setopt(ch->cp, CURLOPT_URL, urlcopy);
|
||||
@@ -855,7 +880,7 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool curl_setopt(resource ch, string option, mixed value)
|
||||
/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
|
||||
Set an option for a CURL transfer */
|
||||
PHP_FUNCTION(curl_setopt)
|
||||
{
|
||||
@@ -956,8 +981,12 @@ PHP_FUNCTION(curl_setopt)
|
||||
char *copystr = NULL;
|
||||
|
||||
convert_to_string_ex(zvalue);
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
|
||||
if (option == CURLOPT_URL) {
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
}
|
||||
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
|
||||
@@ -1086,18 +1115,22 @@ PHP_FUNCTION(curl_setopt)
|
||||
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
|
||||
|
||||
postval = Z_STRVAL_PP(current);
|
||||
|
||||
/* The arguments after _NAMELENGTH and _CONTENTSLENGTH
|
||||
* must be explicitly cast to long in curl_formadd
|
||||
* use since curl needs a long not an int. */
|
||||
if (*postval == '@') {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILE, ++postval,
|
||||
CURLFORM_END);
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-11
@@ -4,11 +4,11 @@ dnl
|
||||
|
||||
dnl Suppose we need FlatFile if no support or only CDB is used.
|
||||
|
||||
AC_DEFUN(PHP_DBA_STD_BEGIN,[
|
||||
AC_DEFUN([PHP_DBA_STD_BEGIN],[
|
||||
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TEMP_LDFLAGS,[
|
||||
AC_DEFUN([PHP_TEMP_LDFLAGS],[
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$1 $LDFLAGS"
|
||||
old_LIBS=$LIBS
|
||||
@@ -19,14 +19,14 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[
|
||||
])
|
||||
|
||||
dnl Assign INCLUDE/LFLAGS from PREFIX
|
||||
AC_DEFUN(PHP_DBA_STD_ASSIGN,[
|
||||
AC_DEFUN([PHP_DBA_STD_ASSIGN],[
|
||||
if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
|
||||
THIS_LFLAGS=$THIS_PREFIX/lib
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Standard check
|
||||
AC_DEFUN(PHP_DBA_STD_CHECK,[
|
||||
AC_DEFUN([PHP_DBA_STD_CHECK],[
|
||||
THIS_RESULT="yes"
|
||||
if test -z "$THIS_INCLUDE"; then
|
||||
AC_MSG_ERROR([DBA: Could not find necessary header file(s).])
|
||||
@@ -37,14 +37,14 @@ AC_DEFUN(PHP_DBA_STD_CHECK,[
|
||||
])
|
||||
|
||||
dnl Attach THIS_x to DBA_x
|
||||
AC_DEFUN(PHP_DBA_STD_ATTACH,[
|
||||
AC_DEFUN([PHP_DBA_STD_ATTACH],[
|
||||
PHP_ADD_LIBRARY_WITH_PATH($THIS_LIBS, $THIS_LFLAGS, DBA_SHARED_LIBADD)
|
||||
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX
|
||||
])
|
||||
|
||||
dnl Print the result message
|
||||
dnl parameters(name [, full name [, empty or error message]])
|
||||
AC_DEFUN(AC_DBA_STD_RESULT,[
|
||||
AC_DEFUN([AC_DBA_STD_RESULT],[
|
||||
THIS_NAME=[]translit($1,a-z0-9-,A-Z0-9_)
|
||||
if test -n "$2"; then
|
||||
THIS_FULL_NAME="$2"
|
||||
@@ -116,7 +116,6 @@ AC_ARG_WITH(gdbm,
|
||||
done
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
unset ac_cv_lib_gdbm_gdbm_open
|
||||
PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
|
||||
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
@@ -169,7 +168,7 @@ AC_DBA_STD_RESULT(ndbm)
|
||||
|
||||
dnl Berkeley specific (library and version test)
|
||||
dnl parameters(version, library list, function)
|
||||
AC_DEFUN(PHP_DBA_DB_CHECK,[
|
||||
AC_DEFUN([PHP_DBA_DB_CHECK],[
|
||||
for LIB in $2; do
|
||||
if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
|
||||
@@ -381,7 +380,7 @@ AC_ARG_WITH(dbm,
|
||||
])
|
||||
AC_DBA_STD_RESULT(dbm)
|
||||
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_CDB,[
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_CDB],[
|
||||
AC_DEFINE(DBA_CDB_BUILTIN, 1, [ ])
|
||||
AC_DEFINE(DBA_CDB_MAKE, 1, [ ])
|
||||
AC_DEFINE(DBA_CDB, 1, [ ])
|
||||
@@ -427,7 +426,7 @@ AC_ARG_WITH(cdb,
|
||||
])
|
||||
AC_DBA_STD_RESULT(cdb)
|
||||
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_INI,[
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_INI],[
|
||||
AC_DEFINE(DBA_INIFILE, 1, [ ])
|
||||
ini_sources="libinifile/inifile.c"
|
||||
THIS_RESULT="builtin"
|
||||
@@ -445,7 +444,7 @@ AC_ARG_WITH(inifile,
|
||||
])
|
||||
AC_DBA_STD_RESULT(inifile,INI File)
|
||||
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_FLATFILE,[
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_FLATFILE],[
|
||||
AC_DEFINE(DBA_FLATFILE, 1, [ ])
|
||||
flat_sources="libflatfile/flatfile.c"
|
||||
THIS_RESULT="builtin"
|
||||
|
||||
@@ -129,6 +129,11 @@ PHP_FUNCTION(dbase_open)
|
||||
convert_to_string_ex(dbf_name);
|
||||
convert_to_long_ex(options);
|
||||
|
||||
if (Z_LVAL_PP(options) == 1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open %s in write-only mode", Z_STRVAL_PP(dbf_name));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #31754: (dbase_open() fails for mode = 1)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('dbase')) {
|
||||
die('skip dbase extension not available');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
// database "definition"
|
||||
$def = array(
|
||||
array("foo", "L")
|
||||
);
|
||||
|
||||
// creation
|
||||
$dbh = dbase_create('/tmp/bug31754.dbf', array(array('foo', 'L')));
|
||||
dbase_close($dbh);
|
||||
|
||||
$dbh = dbase_open('/tmp/bug31754.dbf', 1);
|
||||
unlink('/tmp/bug31754.dbf');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: dbase_open(): Cannot open /tmp/bug31754.dbf in write-only mode in %sbug31754.php on line %d
|
||||
@@ -611,6 +611,8 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
memset(&newtio, 0, sizeof(newtio));
|
||||
tcgetattr(f->fd, &newtio);
|
||||
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
|
||||
newtio.c_iflag = IGNPAR;
|
||||
newtio.c_oflag = 0;
|
||||
|
||||
+48
-3
@@ -1129,9 +1129,55 @@ PHP_FUNCTION(dom_node_replace_child)
|
||||
}
|
||||
|
||||
if (foundoldchild) {
|
||||
xmlNodePtr node;
|
||||
zval *rv = NULL;
|
||||
if (oldchild != newchild) {
|
||||
xmlNodePtr node;
|
||||
|
||||
if (newchild->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
xmlNodePtr fragment, prevsib, nextsib;
|
||||
fragment = newchild;
|
||||
prevsib = oldchild->prev;
|
||||
nextsib = oldchild->next;
|
||||
|
||||
newchild = fragment->children;
|
||||
|
||||
xmlUnlinkNode(oldchild);
|
||||
|
||||
if (prevsib == NULL && nextsib == NULL) {
|
||||
nodep->children = newchild;
|
||||
nodep->last = fragment->last;
|
||||
} else {
|
||||
if (newchild) {
|
||||
prevsib->next = newchild;
|
||||
newchild->prev = prevsib;
|
||||
|
||||
fragment->last->next = nextsib;
|
||||
if (nextsib) {
|
||||
nextsib->prev = fragment->last;
|
||||
} else {
|
||||
nodep->last = fragment->last;
|
||||
}
|
||||
}
|
||||
}
|
||||
node = newchild;
|
||||
while (node != NULL) {
|
||||
node->parent = nodep;
|
||||
if (node->doc != nodep->doc) {
|
||||
xmlSetTreeDoc(node, nodep->doc);
|
||||
if (node->_private != NULL) {
|
||||
newchildobj = node->_private;
|
||||
newchildobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)newchildobj, NULL TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (node == fragment->last) {
|
||||
break;
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
fragment->children = NULL;
|
||||
fragment->last = NULL;
|
||||
} else if (oldchild != newchild) {
|
||||
if (newchild->doc == NULL && nodep->doc != NULL) {
|
||||
xmlSetTreeDoc(newchild, nodep->doc);
|
||||
newchildobj->document = intern->document;
|
||||
@@ -1146,7 +1192,6 @@ PHP_FUNCTION(dom_node_replace_child)
|
||||
php_dom_throw_error(NOT_FOUND_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
/* }}} end dom_node_replace_child */
|
||||
|
||||
|
||||
+35
-4
@@ -200,6 +200,38 @@ static void dom_register_prop_handler(HashTable *prop_handler, char *name, dom_r
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zval **dom_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC)
|
||||
{
|
||||
dom_object *obj;
|
||||
zval tmp_member;
|
||||
zval **retval = NULL;
|
||||
dom_prop_handler *hnd;
|
||||
zend_object_handlers *std_hnd;
|
||||
int ret = FAILURE;
|
||||
|
||||
if (member->type != IS_STRING) {
|
||||
tmp_member = *member;
|
||||
zval_copy_ctor(&tmp_member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
}
|
||||
|
||||
obj = (dom_object *)zend_objects_get_address(object TSRMLS_CC);
|
||||
|
||||
if (obj->prop_handler != NULL) {
|
||||
ret = zend_hash_find(obj->prop_handler, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &hnd);
|
||||
}
|
||||
if (ret == FAILURE) {
|
||||
std_hnd = zend_get_std_object_handlers();
|
||||
retval = std_hnd->get_property_ptr_ptr(object, member TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (member == &tmp_member) {
|
||||
zval_dtor(member);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* {{{ dom_read_property */
|
||||
zval *dom_read_property(zval *object, zval *member, int type TSRMLS_DC)
|
||||
{
|
||||
@@ -234,7 +266,6 @@ zval *dom_read_property(zval *object, zval *member, int type TSRMLS_DC)
|
||||
} else {
|
||||
std_hnd = zend_get_std_object_handlers();
|
||||
retval = std_hnd->read_property(object, member, type TSRMLS_CC);
|
||||
retval->refcount = 1;
|
||||
}
|
||||
|
||||
if (member == &tmp_member) {
|
||||
@@ -393,13 +424,13 @@ PHP_MINIT_FUNCTION(dom)
|
||||
memcpy(&dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
dom_object_handlers.read_property = dom_read_property;
|
||||
dom_object_handlers.write_property = dom_write_property;
|
||||
dom_object_handlers.get_property_ptr_ptr = NULL;
|
||||
dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
|
||||
dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
|
||||
|
||||
memcpy(&dom_ze1_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
dom_ze1_object_handlers.read_property = dom_read_property;
|
||||
dom_ze1_object_handlers.write_property = dom_write_property;
|
||||
dom_ze1_object_handlers.get_property_ptr_ptr = NULL;
|
||||
dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
|
||||
dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj;
|
||||
|
||||
zend_hash_init(&classes, 0, NULL, NULL, 1);
|
||||
@@ -899,7 +930,7 @@ void dom_objects_clone(void *object, void **object_clone TSRMLS_DC)
|
||||
clone->document = intern->document;
|
||||
}
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)clone, cloned_node->doc TSRMLS_CC);
|
||||
php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, NULL TSRMLS_CC);
|
||||
php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, (void *)clone TSRMLS_CC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+21
-2
@@ -66,7 +66,7 @@
|
||||
#include "ext/standard/php_image.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
|
||||
#if defined(PHP_WIN32) || (HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING))
|
||||
#define EXIF_USE_MBSTRING 1
|
||||
#else
|
||||
#define EXIF_USE_MBSTRING 0
|
||||
@@ -76,6 +76,9 @@
|
||||
#include "ext/mbstring/mbstring.h"
|
||||
#endif
|
||||
|
||||
/* needed for ssize_t definition */
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
#ifndef safe_emalloc
|
||||
@@ -93,12 +96,13 @@ typedef unsigned char uchar;
|
||||
|
||||
#define EFREE_IF(ptr) if (ptr) efree(ptr)
|
||||
|
||||
#define MAX_IFD_NESTING_LEVEL 100
|
||||
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1)
|
||||
ZEND_ARG_PASS_INFO(0)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
|
||||
/* {{{ exif_functions[]
|
||||
*/
|
||||
function_entry exif_functions[] = {
|
||||
@@ -1442,6 +1446,7 @@ typedef struct {
|
||||
/* for parsing */
|
||||
int read_thumbnail;
|
||||
int read_all;
|
||||
int ifd_nesting_level;
|
||||
/* internal */
|
||||
file_section_list file;
|
||||
} image_info_type;
|
||||
@@ -2711,6 +2716,13 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
size_t byte_count, offset_val, fpos, fgot;
|
||||
xp_field_type *tmp_xp;
|
||||
|
||||
/* Protect against corrupt headers */
|
||||
if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
|
||||
exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level reached");
|
||||
return FALSE;
|
||||
}
|
||||
ImageInfo->ifd_nesting_level++;
|
||||
|
||||
tag = php_ifd_get16u(dir_entry, ImageInfo->motorola_intel);
|
||||
format = php_ifd_get16u(dir_entry+2, ImageInfo->motorola_intel);
|
||||
components = php_ifd_get32u(dir_entry+4, ImageInfo->motorola_intel);
|
||||
@@ -2724,6 +2736,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
|
||||
byte_count = components * php_tiff_bytes_per_format[format];
|
||||
|
||||
if ((ssize_t)byte_count < 0) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count(%ld)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (byte_count > 4) {
|
||||
offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel);
|
||||
/* If its bigger than 4 bytes, the dir entry contains an offset. */
|
||||
@@ -3739,6 +3756,8 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
|
||||
}
|
||||
}
|
||||
|
||||
ImageInfo->ifd_nesting_level = 0;
|
||||
|
||||
/* Scan the JPEG headers. */
|
||||
ret = exif_scan_FILE_header(ImageInfo TSRMLS_CC);
|
||||
|
||||
|
||||
+3
-32
@@ -64,9 +64,9 @@ zend_module_entry fam_module_entry = {
|
||||
"fam",
|
||||
fam_functions,
|
||||
PHP_MINIT(fam),
|
||||
PHP_MSHUTDOWN(fam),
|
||||
PHP_RINIT(fam), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(fam), /* Replace with NULL if there's nothing to do at request end */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(fam),
|
||||
#if ZEND_MODULE_API_NO >= 20010901
|
||||
"0.1", /* Replace with version number for your extension */
|
||||
@@ -128,35 +128,6 @@ PHP_MINIT_FUNCTION(fam)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(fam)
|
||||
{
|
||||
/* uncomment this line if you have INI entries
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
*/
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Remove if there's nothing to do at request start */
|
||||
/* {{{ PHP_RINIT_FUNCTION
|
||||
*/
|
||||
PHP_RINIT_FUNCTION(fam)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Remove if there's nothing to do at request end */
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_RSHUTDOWN_FUNCTION(fam)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MINFO_FUNCTION
|
||||
*/
|
||||
PHP_MINFO_FUNCTION(fam)
|
||||
|
||||
@@ -35,9 +35,6 @@ extern zend_module_entry fam_module_entry;
|
||||
#endif
|
||||
|
||||
PHP_MINIT_FUNCTION(fam);
|
||||
PHP_MSHUTDOWN_FUNCTION(fam);
|
||||
PHP_RINIT_FUNCTION(fam);
|
||||
PHP_RSHUTDOWN_FUNCTION(fam);
|
||||
PHP_MINFO_FUNCTION(fam);
|
||||
|
||||
PHP_FUNCTION(fam_open);
|
||||
|
||||
+57
-18
@@ -477,11 +477,11 @@ PHP_MINFO_FUNCTION(fbsql)
|
||||
|
||||
if (FB_SQL_G(allowPersistent))
|
||||
{
|
||||
sprintf(buf, "%ld", FB_SQL_G(persistentCount));
|
||||
snprintf(buf, sizeof(buf), "%ld", FB_SQL_G(persistentCount));
|
||||
php_info_print_table_row(2, "Active Persistent Links", buf);
|
||||
}
|
||||
|
||||
sprintf(buf, "%ld", FB_SQL_G(linkCount));
|
||||
snprintf(buf, sizeof(buf), "%ld", FB_SQL_G(linkCount));
|
||||
php_info_print_table_row(2, "Active Links", buf);
|
||||
|
||||
/*
|
||||
@@ -525,7 +525,9 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
if (userName == NULL) userName = FB_SQL_G(userName);
|
||||
if (userPassword == NULL) userPassword = FB_SQL_G(userPassword);
|
||||
|
||||
sprintf(name, "fbsql_%s_%s_%s", hostName, userName, userPassword);
|
||||
if (snprintf(name, sizeof(name), "fbsql_%s_%s_%s", hostName, userName, userPassword) < 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!FB_SQL_G(allowPersistent)) {
|
||||
persistent=0;
|
||||
@@ -836,9 +838,21 @@ PHP_FUNCTION(fbsql_set_transaction)
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Z_LVAL_PP(Locking) < 0 || Z_LVAL_PP(Locking) > 2) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locking type.");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (Z_LVAL_PP(Isolation) < 0 || Z_LVAL_PP(Isolation) > 4) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid isolation type.");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, -1, "FrontBase-Link", le_link, le_plink);
|
||||
|
||||
sprintf(strSQL, "SET TRANSACTION LOCKING %s, ISOLATION %s;", strLocking[Z_LVAL_PP(Locking)], strIsolation[Z_LVAL_PP(Isolation)]);
|
||||
if (snprintf(strSQL, sizeof(strSQL) , "SET TRANSACTION LOCKING %s, ISOLATION %s;", strLocking[Z_LVAL_PP(Locking)], strIsolation[Z_LVAL_PP(Isolation)]) < 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
md = fbcdcExecuteDirectSQL(phpLink->connection, strSQL);
|
||||
fbcmdRelease(md);
|
||||
@@ -1472,7 +1486,9 @@ PHP_FUNCTION(fbsql_change_user)
|
||||
convert_to_string_ex(password);
|
||||
userPassword = Z_STRVAL_PP(password);
|
||||
|
||||
sprintf(buffer, "SET AUTHORIZATION %s;", userName);
|
||||
if (snprintf(buffer, sizeof(buffer), "SET AUTHORIZATION %s;", userName) < 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, buffer, phpLink);
|
||||
if (Z_LVAL_P(return_value))
|
||||
@@ -1851,6 +1867,24 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
|
||||
fbcemdRelease(emd);
|
||||
result = 0;
|
||||
}
|
||||
else if (fbcmdWarningsFound(md))
|
||||
{
|
||||
FBCErrorMetaData* emd = fbcdcErrorMetaData(c, md);
|
||||
char* emg = fbcemdAllErrorMessages(emd);
|
||||
if (FB_SQL_G(generateWarnings))
|
||||
{
|
||||
if (emg)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Warning in statement: '%s' %s", sql, emg);
|
||||
else
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
|
||||
}
|
||||
link->errorText = strdup(emg);
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);
|
||||
free(emg);
|
||||
fbcemdRelease(emd);
|
||||
result = 1;
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1879,9 +1913,12 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
|
||||
md = meta;
|
||||
|
||||
tp = fbcmdStatementType(md);
|
||||
|
||||
if ((tp[0] == 'C') || (tp[0] == 'R'))
|
||||
{
|
||||
if (tp == NULL) {
|
||||
fbcmdRelease(meta);
|
||||
ZVAL_BOOL(return_value, 1)
|
||||
}
|
||||
else if ((tp[0] == 'C') || (tp[0] == 'R'))
|
||||
{
|
||||
if (sR == 1 && md) fbcmdRelease(md);
|
||||
ZVAL_BOOL(return_value, 1)
|
||||
}
|
||||
@@ -2139,7 +2176,9 @@ PHP_FUNCTION(fbsql_list_fields)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
sprintf(sql, "SELECT * FROM %s WHERE 1=0;", tableName);
|
||||
if (snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE 1=0;", tableName) < 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, sql, phpLink);
|
||||
}
|
||||
@@ -2323,7 +2362,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
int v = *((int*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
snprintf(b, sizeof(b), "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
@@ -2332,7 +2371,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
short int v = *((FBTinyInteger*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
snprintf(b, sizeof(b), "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
@@ -2343,9 +2382,9 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
FBLongInteger v = *((FBLongInteger*)data);
|
||||
char b[128];
|
||||
#ifdef PHP_WIN32
|
||||
sprintf(b, "%I64i", v);
|
||||
snprintf(b, sizeof(b), "%I64i", v);
|
||||
#else
|
||||
sprintf(b, "%ll", v);
|
||||
snprintf(b, sizeof(b), "%ll", v);
|
||||
#endif
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2355,7 +2394,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
short v = *((short*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
snprintf(b, sizeof(b), "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
@@ -2368,7 +2407,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
double v = *((double*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%f", v);
|
||||
snprintf(b, sizeof(b), "%f", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
@@ -2423,7 +2462,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
*length = l*2+3+1;
|
||||
if (value)
|
||||
{
|
||||
char* r = safe_emalloc(l, 2, 1);
|
||||
char* r = safe_emalloc(l, 2, 4);
|
||||
r[0] = 'B';
|
||||
r[1] = '\'';
|
||||
for (i = 0; i < nBits; i++)
|
||||
@@ -2455,7 +2494,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
char b[128];
|
||||
int v = *((unsigned int*)data);
|
||||
sprintf(b, "%d", v);
|
||||
snprintf(b, sizeof(b), "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
@@ -2464,7 +2503,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
{
|
||||
char b[128];
|
||||
double seconds = *((double*)data);
|
||||
sprintf(b, "%f", seconds);
|
||||
snprintf(b, sizeof(b), "%f", seconds);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
break;
|
||||
|
||||
+43
-1
@@ -96,11 +96,43 @@ PHP_MINIT_FUNCTION(filepro)
|
||||
fp_globals = (fp_global_struct *) LocalAlloc(LPTR, sizeof(fp_global_struct));
|
||||
TlsSetValue(FPTls, (void *) fp_globals);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RINIT_FUNCTION
|
||||
*/
|
||||
PHP_RINIT_FUNCTION(filepro)
|
||||
{
|
||||
FP_GLOBAL(fp_database)=NULL;
|
||||
FP_GLOBAL(fp_fcount)=-1;
|
||||
FP_GLOBAL(fp_keysize)=-1;
|
||||
FP_GLOBAL(fp_fieldlist)=NULL;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_RSHUTDOWN_FUNCTION(filepro)
|
||||
{
|
||||
FP_FIELD *tmp, *next;
|
||||
|
||||
if (FP_GLOBAL(fp_database)) {
|
||||
efree(FP_GLOBAL(fp_database));
|
||||
}
|
||||
|
||||
if (FP_GLOBAL(fp_fieldlist)) {
|
||||
for (tmp = FP_GLOBAL(fp_fieldlist); tmp;) {
|
||||
efree(tmp->name);
|
||||
efree(tmp->format);
|
||||
next = tmp->next;
|
||||
efree(tmp);
|
||||
tmp=next;
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -143,7 +175,15 @@ function_entry filepro_functions[] = {
|
||||
|
||||
zend_module_entry filepro_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
"filepro",
|
||||
filepro_functions,
|
||||
PHP_MINIT(filepro),
|
||||
PHP_MSHUTDOWN(filepro),
|
||||
PHP_RINIT(filepro),
|
||||
PHP_RSHUTDOWN(filepro),
|
||||
NULL,
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -214,6 +254,8 @@ PHP_FUNCTION(filepro)
|
||||
tmp = FP_GLOBAL(fp_fieldlist);
|
||||
while (tmp != NULL) {
|
||||
next = tmp->next;
|
||||
efree(tmp->name);
|
||||
efree(tmp->format);
|
||||
efree(tmp);
|
||||
tmp = next;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ PHP_FUNCTION(filepro_fieldcount);
|
||||
PHP_FUNCTION(filepro_retrieve);
|
||||
|
||||
PHP_MINIT_FUNCTION(filepro);
|
||||
PHP_RINIT_FUNCTION(filepro);
|
||||
PHP_RSHUTDOWN_FUNCTION(filepro);
|
||||
PHP_MSHUTDOWN_FUNCTION(filepro);
|
||||
#else
|
||||
#define phpext_filepro_ptr NULL
|
||||
|
||||
+5
-18
@@ -42,13 +42,9 @@
|
||||
#ifdef USE_WINSOCK /* Modified to use Winsock (NOVSOCK2.H), atleast for now */
|
||||
#include <novsock2.h>
|
||||
#else
|
||||
#ifdef NEW_LIBC
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
@@ -77,7 +73,7 @@
|
||||
#include "ext/standard/fsock.h"
|
||||
|
||||
/* Additional headers for NetWare */
|
||||
#if defined(NETWARE) && defined(NEW_LIBC) && !defined(USE_WINSOCK)
|
||||
#if defined(NETWARE) && !defined(USE_WINSOCK)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
@@ -842,7 +838,9 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
|
||||
}
|
||||
|
||||
if (type == FTPTYPE_ASCII) {
|
||||
#ifndef PHP_WIN32
|
||||
char *s;
|
||||
#endif
|
||||
char *ptr = data->buf;
|
||||
char *e = ptr + rcvd;
|
||||
/* logic depends on the OS EOL
|
||||
@@ -850,19 +848,8 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
|
||||
* Everything Else \n
|
||||
*/
|
||||
#ifdef PHP_WIN32
|
||||
while ((s = strpbrk(ptr, "\r\n"))) {
|
||||
if (*s == '\n') {
|
||||
php_stream_putc(outstream, '\r');
|
||||
} else if (*s == '\r' && *(s + 1) == '\n') {
|
||||
s++;
|
||||
}
|
||||
s++;
|
||||
php_stream_write(outstream, ptr, (s - ptr));
|
||||
if (*(s - 1) == '\r') {
|
||||
php_stream_putc(outstream, '\n');
|
||||
}
|
||||
ptr = s;
|
||||
}
|
||||
php_stream_write(outstream, ptr, (e - ptr));
|
||||
ptr = e;
|
||||
#else
|
||||
while (e > ptr && (s = memchr(ptr, '\r', (e - ptr)))) {
|
||||
php_stream_write(outstream, ptr, (s - ptr));
|
||||
|
||||
+8
-8
@@ -25,14 +25,8 @@
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#ifdef NETWARE
|
||||
#ifdef USE_WINSOCK
|
||||
#if defined(NETWARE) && defined(USE_WINSOCK)
|
||||
#include <novsock2.h>
|
||||
#else
|
||||
#ifndef NEW_LIBC
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_OPENSSL_EXT
|
||||
@@ -685,6 +679,10 @@ PHP_FUNCTION(ftp_get)
|
||||
resumepos = 0;
|
||||
}
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
mode = FTPTYPE_IMAGE;
|
||||
#endif
|
||||
|
||||
if (ftp->autoseek && resumepos) {
|
||||
outstream = php_stream_open_wrapper(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
|
||||
if (outstream == NULL) {
|
||||
@@ -743,7 +741,9 @@ PHP_FUNCTION(ftp_nb_get)
|
||||
if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
|
||||
resumepos = 0;
|
||||
}
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
mode = FTPTYPE_IMAGE;
|
||||
#endif
|
||||
if (ftp->autoseek && resumepos) {
|
||||
outstream = php_stream_open_wrapper(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
|
||||
if (outstream == NULL) {
|
||||
|
||||
+13
-11
@@ -47,7 +47,7 @@ dnl
|
||||
dnl Checks for the configure options
|
||||
dnl
|
||||
|
||||
AC_DEFUN(PHP_GD_JPEG,[
|
||||
AC_DEFUN([PHP_GD_JPEG],[
|
||||
if test "$PHP_JPEG_DIR" != "no"; then
|
||||
|
||||
for i in $PHP_JPEG_DIR /usr/local /usr; do
|
||||
@@ -72,7 +72,7 @@ AC_DEFUN(PHP_GD_JPEG,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_PNG,[
|
||||
AC_DEFUN([PHP_GD_PNG],[
|
||||
if test "$PHP_PNG_DIR" != "no"; then
|
||||
|
||||
for i in $PHP_PNG_DIR /usr/local /usr; do
|
||||
@@ -107,7 +107,7 @@ AC_DEFUN(PHP_GD_PNG,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_XPM,[
|
||||
AC_DEFUN([PHP_GD_XPM],[
|
||||
if test "$PHP_XPM_DIR" != "no"; then
|
||||
|
||||
for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
|
||||
@@ -141,7 +141,7 @@ AC_DEFUN(PHP_GD_XPM,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_FREETYPE1,[
|
||||
AC_DEFUN([PHP_GD_FREETYPE1],[
|
||||
if test "$PHP_TTF" != "no"; then
|
||||
if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
|
||||
if test -n "$PHP_TTF"; then
|
||||
@@ -176,7 +176,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_FREETYPE2,[
|
||||
AC_DEFUN([PHP_GD_FREETYPE2],[
|
||||
if test "$PHP_FREETYPE_DIR" != "no"; then
|
||||
|
||||
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
||||
@@ -201,7 +201,7 @@ AC_DEFUN(PHP_GD_FREETYPE2,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_T1LIB,[
|
||||
AC_DEFUN([PHP_GD_T1LIB],[
|
||||
if test "$PHP_T1LIB" != "no"; then
|
||||
|
||||
for i in $PHP_T1LIB /usr/local /usr; do
|
||||
@@ -225,19 +225,19 @@ AC_DEFUN(PHP_GD_T1LIB,[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_TTSTR,[
|
||||
AC_DEFUN([PHP_GD_TTSTR],[
|
||||
if test "$PHP_GD_NATIVE_TTF" = "yes"; then
|
||||
AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_JISX0208,[
|
||||
AC_DEFUN([PHP_GD_JISX0208],[
|
||||
if test "$PHP_GD_JIS_CONV" = "yes"; then
|
||||
USE_GD_JIS_CONV=1
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GD_CHECK_VERSION,[
|
||||
AC_DEFUN([PHP_GD_CHECK_VERSION],[
|
||||
PHP_CHECK_LIBRARY(gd, gdImageString16, [AC_DEFINE(HAVE_LIBGD13, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImagePaletteCopy, [AC_DEFINE(HAVE_LIBGD15, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
@@ -258,8 +258,9 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
|
||||
PHP_CHECK_LIBRARY(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_THREAD_SAFE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFreeFontCache, [AC_DEFINE(HAVE_GD_FREEFONTCACHE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -309,6 +310,7 @@ dnl These are always available with bundled library
|
||||
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])
|
||||
AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])
|
||||
|
||||
dnl Make sure the libgd/ is first in the include path
|
||||
|
||||
+63
-71
@@ -335,9 +335,9 @@ zend_module_entry gd_module_entry = {
|
||||
"gd",
|
||||
gd_functions,
|
||||
PHP_MINIT(gd),
|
||||
PHP_MSHUTDOWN(gd),
|
||||
NULL,
|
||||
NULL,
|
||||
#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
|
||||
#if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || HAVE_GD_FREEFONTCACHE)
|
||||
PHP_RSHUTDOWN(gd),
|
||||
#else
|
||||
NULL,
|
||||
@@ -373,6 +373,18 @@ static void php_free_gd_font(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(gd)
|
||||
{
|
||||
#if HAVE_LIBT1
|
||||
T1_CloseLib();
|
||||
#endif
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ PHP_MINIT_FUNCTION
|
||||
*/
|
||||
PHP_MINIT_FUNCTION(gd)
|
||||
@@ -444,10 +456,10 @@ PHP_MINIT_FUNCTION(gd)
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION
|
||||
*/
|
||||
#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
|
||||
#if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || HAVE_GD_FREEFONTCACHE)
|
||||
PHP_RSHUTDOWN_FUNCTION(gd)
|
||||
{
|
||||
#if defined(HAVE_GD_THREAD_SAFE) || defined(HAVE_GD_BUNDLED)
|
||||
#if HAVE_GD_FONTCACHESHUTDOWN
|
||||
gdFontCacheShutdown();
|
||||
#else
|
||||
gdFreeFontCache();
|
||||
@@ -3058,7 +3070,7 @@ PHP_FUNCTION(imagesy)
|
||||
#ifdef ENABLE_GD_TTF
|
||||
|
||||
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
|
||||
/* {{{ proto array imageftbbox(int size, int angle, string font_file, string text[, array extrainfo])
|
||||
/* {{{ proto array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])
|
||||
Give the bounding box of a text using fonts via freetype2 */
|
||||
PHP_FUNCTION(imageftbbox)
|
||||
{
|
||||
@@ -3066,7 +3078,7 @@ PHP_FUNCTION(imageftbbox)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array imagefttext(resource im, int size, int angle, int x, int y, int col, string font_file, string text, [array extrainfo])
|
||||
/* {{{ proto array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])
|
||||
Write text to the image using fonts via freetype2 */
|
||||
PHP_FUNCTION(imagefttext)
|
||||
{
|
||||
@@ -3075,7 +3087,7 @@ PHP_FUNCTION(imagefttext)
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ proto array imagettfbbox(int size, int angle, string font_file, string text)
|
||||
/* {{{ proto array imagettfbbox(float size, float angle, string font_file, string text)
|
||||
Give the bounding box of a text using TrueType fonts */
|
||||
PHP_FUNCTION(imagettfbbox)
|
||||
{
|
||||
@@ -3083,7 +3095,7 @@ PHP_FUNCTION(imagettfbbox)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array imagettftext(resource im, int size, int angle, int x, int y, int col, string font_file, string text)
|
||||
/* {{{ proto array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)
|
||||
Write text to the image using a TrueType font */
|
||||
PHP_FUNCTION(imagettftext)
|
||||
{
|
||||
@@ -3095,13 +3107,13 @@ PHP_FUNCTION(imagettftext)
|
||||
*/
|
||||
static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended)
|
||||
{
|
||||
zval **IM, **PTSIZE, **ANGLE, **X, **Y, **C, **FONTNAME, **COL, **EXT = NULL;
|
||||
zval *IM, *EXT = NULL;
|
||||
gdImagePtr im=NULL;
|
||||
int col, x, y, l=0, i, brect[8];
|
||||
int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8];
|
||||
double ptsize, angle;
|
||||
unsigned char *str = NULL, *fontname = NULL;
|
||||
char *error = NULL;
|
||||
int argc;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
#if HAVE_GD_STRINGFTEX
|
||||
gdFTStringExtra strex = {0};
|
||||
#endif
|
||||
@@ -3110,85 +3122,65 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
|
||||
assert(!extended);
|
||||
#endif
|
||||
|
||||
argc = ZEND_NUM_ARGS();
|
||||
|
||||
if (mode == TTFTEXT_BBOX) {
|
||||
if (argc < 4 || argc > 5 || zend_get_parameters_ex(argc, &PTSIZE, &ANGLE, &FONTNAME, &C, &EXT) == FAILURE) {
|
||||
if (argc < 4 || argc > ((extended) ? 5 : 4)) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
} else if (zend_parse_parameters(argc TSRMLS_CC, "ddss|a", &ptsize, &angle, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
if (argc < 8 || argc > 9 || zend_get_parameters_ex(argc, &IM, &PTSIZE, &ANGLE, &X, &Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
|
||||
if (argc < 8 || argc > ((extended) ? 9 : 8)) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
} else if (zend_parse_parameters(argc TSRMLS_CC, "rddlllss|a", &IM, &ptsize, &angle, &x, &y, &col, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
|
||||
}
|
||||
|
||||
convert_to_double_ex(PTSIZE);
|
||||
convert_to_double_ex(ANGLE);
|
||||
convert_to_string_ex(FONTNAME);
|
||||
convert_to_string_ex(C);
|
||||
|
||||
if (mode == TTFTEXT_BBOX) {
|
||||
im = NULL;
|
||||
col = x = y = -1;
|
||||
} else {
|
||||
convert_to_long_ex(X);
|
||||
convert_to_long_ex(Y);
|
||||
convert_to_long_ex(COL);
|
||||
col = Z_LVAL_PP(COL);
|
||||
y = Z_LVAL_PP(Y);
|
||||
x = Z_LVAL_PP(X);
|
||||
/* convert angle to radians */
|
||||
angle = angle * (M_PI/180);
|
||||
|
||||
#if HAVE_GD_STRINGFTEX
|
||||
if (EXT) {
|
||||
/* parse extended info */
|
||||
if (extended && EXT) { /* parse extended info */
|
||||
HashPosition pos;
|
||||
|
||||
HashPosition pos;
|
||||
/* walk the assoc array */
|
||||
zend_hash_internal_pointer_reset_ex(HASH_OF(EXT), &pos);
|
||||
do {
|
||||
zval ** item;
|
||||
char * key;
|
||||
ulong num_key;
|
||||
|
||||
convert_to_array_ex(EXT);
|
||||
if (zend_hash_get_current_key_ex(HASH_OF(EXT), &key, NULL, &num_key, 0, &pos) != HASH_KEY_IS_STRING) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* walk the assoc array */
|
||||
zend_hash_internal_pointer_reset_ex(HASH_OF(*EXT), &pos);
|
||||
do {
|
||||
zval ** item;
|
||||
char * key;
|
||||
ulong num_key;
|
||||
|
||||
if (zend_hash_get_current_key_ex(HASH_OF(*EXT), &key, NULL, &num_key, 0, &pos) != HASH_KEY_IS_STRING) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (zend_hash_get_current_data_ex(HASH_OF(*EXT), (void **) &item, &pos) == FAILURE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp("linespacing", key) == 0) {
|
||||
convert_to_double_ex(item);
|
||||
strex.flags |= gdFTEX_LINESPACE;
|
||||
strex.linespacing = Z_DVAL_PP(item);
|
||||
}
|
||||
|
||||
} while (zend_hash_move_forward_ex(HASH_OF(*EXT), &pos) == SUCCESS);
|
||||
}
|
||||
#endif
|
||||
if (zend_hash_get_current_data_ex(HASH_OF(EXT), (void **) &item, &pos) == FAILURE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp("linespacing", key) == 0) {
|
||||
convert_to_double_ex(item);
|
||||
strex.flags |= gdFTEX_LINESPACE;
|
||||
strex.linespacing = Z_DVAL_PP(item);
|
||||
}
|
||||
|
||||
} while (zend_hash_move_forward_ex(HASH_OF(EXT), &pos) == SUCCESS);
|
||||
}
|
||||
|
||||
ptsize = Z_DVAL_PP(PTSIZE);
|
||||
angle = Z_DVAL_PP(ANGLE) * (M_PI / 180); /* convert to radians */
|
||||
|
||||
str = (unsigned char *) Z_STRVAL_PP(C);
|
||||
l = strlen(str);
|
||||
#endif
|
||||
|
||||
#ifdef VIRTUAL_DIR
|
||||
{
|
||||
char tmp_font_path[MAXPATHLEN];
|
||||
if (VCWD_REALPATH(Z_STRVAL_PP(FONTNAME), tmp_font_path)) {
|
||||
fontname = (unsigned char *) Z_STRVAL_PP(FONTNAME);
|
||||
|
||||
if (VCWD_REALPATH(fontname, tmp_font_path)) {
|
||||
fontname = (unsigned char *) fontname;
|
||||
} else {
|
||||
fontname = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
fontname = (unsigned char *) Z_STRVAL_PP(FONTNAME);
|
||||
fontname = (unsigned char *) fontname;
|
||||
#endif
|
||||
|
||||
#ifdef USE_GD_IMGSTRTTF
|
||||
@@ -3479,7 +3471,7 @@ PHP_FUNCTION(imagepstext)
|
||||
#else
|
||||
if (_fg < 0 || _fg > gdImageColorsTotal(bg_img)) {
|
||||
#endif
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Foreground color index %d out of range", _fg);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Foreground color index %ld out of range", _fg);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -3488,7 +3480,7 @@ PHP_FUNCTION(imagepstext)
|
||||
#else
|
||||
if (_bg < 0 || _bg > gdImageColorsTotal(bg_img)) {
|
||||
#endif
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Background color index %d out of range", _bg);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Background color index %ld out of range", _bg);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -3530,7 +3522,7 @@ PHP_FUNCTION(imagepstext)
|
||||
T1_AASetLevel(T1_AA_HIGH);
|
||||
break;
|
||||
default:
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value %d as number of steps for antialiasing", aa_steps);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value %ld as number of steps for antialiasing", aa_steps);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
#if PHP_WIN32
|
||||
#define ENABLE_GD_TTF
|
||||
#else
|
||||
#include "php_config.h"
|
||||
#include <php_config.h>
|
||||
#endif
|
||||
#if (HAVE_LIBTTF | HAVE_LIBFREETYPE) && !defined(HAVE_GD_CACHE_CREATE)
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#if PHP_WIN32
|
||||
#include "config.w32.h"
|
||||
#else
|
||||
#include "php_config.h"
|
||||
#include <php_config.h>
|
||||
#endif
|
||||
#if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF)
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -3,7 +3,7 @@ gif --> gd1/gd2 conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ gif --> jpeg conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ gif --> png conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ imagefilter() function test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip this test requires bundled gd library.");
|
||||
|
||||
@@ -3,7 +3,7 @@ imagefttext() function test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!function_exists("imagefttext")) {
|
||||
die("skip imagefttext() not available.");
|
||||
|
||||
@@ -3,7 +3,7 @@ jpeg <--> png conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ jpeg <--> gd1/gd2 conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ png <--> gd1/gd2 conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ xbm --> png conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!function_exists("imagepng")) {
|
||||
die("skip png support unavailable");
|
||||
|
||||
@@ -3,7 +3,7 @@ xpm --> gd1/gd2 conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ xpm --> jpeg conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
@@ -3,7 +3,7 @@ xpm --> png conversion test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not avaliable.");
|
||||
die("skip gd extension not available.");
|
||||
}
|
||||
if (!GD_BUNDLED) {
|
||||
die("skip external GD libraries always fail");
|
||||
|
||||
+49
-2
@@ -781,7 +781,28 @@ ZEND_FUNCTION(gmp_abs)
|
||||
Calculates factorial function */
|
||||
ZEND_FUNCTION(gmp_fact)
|
||||
{
|
||||
gmp_unary_ui_op(mpz_fac_ui);
|
||||
zval **a_arg;
|
||||
mpz_t *gmpnum_tmp;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a_arg) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if (Z_TYPE_PP(a_arg) == IS_RESOURCE) {
|
||||
FETCH_GMP_ZVAL(gmpnum_tmp, a_arg);
|
||||
if (mpz_sgn(*gmpnum_tmp) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Number has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
convert_to_long_ex(a_arg);
|
||||
if (Z_LVAL_PP(a_arg) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Number has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
gmp_zval_unary_ui_op(return_value, a_arg, mpz_fac_ui);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -839,6 +860,10 @@ ZEND_FUNCTION(gmp_powm)
|
||||
use_ui = 1;
|
||||
} else {
|
||||
FETCH_GMP_ZVAL(gmpnum_exp, exp_arg);
|
||||
if (mpz_sgn(*gmpnum_exp) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Second parameter cannot be less than 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
FETCH_GMP_ZVAL(gmpnum_mod, mod_arg);
|
||||
|
||||
@@ -862,7 +887,24 @@ ZEND_FUNCTION(gmp_powm)
|
||||
Takes integer part of square root of a */
|
||||
ZEND_FUNCTION(gmp_sqrt)
|
||||
{
|
||||
gmp_unary_op(mpz_sqrt);
|
||||
zval **a_arg;
|
||||
mpz_t *gmpnum_a, *gmpnum_result;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a_arg) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
FETCH_GMP_ZVAL(gmpnum_a, a_arg);
|
||||
|
||||
if (mpz_sgn(*gmpnum_a) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Number has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
INIT_GMP_NUM(gmpnum_result);
|
||||
mpz_sqrt(*gmpnum_result, *gmpnum_a);
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -880,6 +922,11 @@ ZEND_FUNCTION(gmp_sqrtrem)
|
||||
|
||||
FETCH_GMP_ZVAL(gmpnum_a, a_arg);
|
||||
|
||||
if (mpz_sgn(*gmpnum_a) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Number has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
INIT_GMP_NUM(gmpnum_result1);
|
||||
INIT_GMP_NUM(gmpnum_result2);
|
||||
|
||||
|
||||
+2
-10
@@ -202,8 +202,8 @@ zend_module_entry hwapi_module_entry = {
|
||||
"hwapi",
|
||||
hwapi_functions,
|
||||
PHP_MINIT(hwapi),
|
||||
PHP_MSHUTDOWN(hwapi),
|
||||
PHP_RINIT(hwapi),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(hwapi),
|
||||
NO_VERSION_YET,
|
||||
@@ -2224,14 +2224,6 @@ PHP_MINIT_FUNCTION(hwapi) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(hwapi) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_RINIT_FUNCTION(hwapi) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_MINFO_FUNCTION(hwapi) {
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "Hyperwave API Support", "enabled");
|
||||
|
||||
@@ -66,8 +66,6 @@ extern PHP_HWAPI_API zend_hwapi_globals hwapi_globals;
|
||||
#endif
|
||||
|
||||
extern PHP_MINIT_FUNCTION(hwapi);
|
||||
extern PHP_MSHUTDOWN_FUNCTION(hwapi);
|
||||
extern PHP_RINIT_FUNCTION(hwapi);
|
||||
PHP_MINFO_FUNCTION(hwapi);
|
||||
|
||||
/* HW_API */
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ if test "$PHP_ICONV" != "no"; then
|
||||
else
|
||||
case "$iconv_lib_name" in
|
||||
iconv [)]
|
||||
AC_MSG_CHECKING([if iconv is Konstantin Chugeuv's])
|
||||
AC_MSG_CHECKING([if iconv is Konstantin Chuguev's])
|
||||
AC_TRY_LINK([#include <iconv.h>],[iconv_ccs_init(NULL, NULL);],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -76,7 +76,7 @@ if test "$PHP_ICONV" != "no"; then
|
||||
|
||||
bsd [)]
|
||||
PHP_DEFINE([HAVE_BSD_ICONV],1,[ext/iconv])
|
||||
AC_DEFINE([HAVE_BSD_ICONV],1,[Konstantin Chugeuv's iconv implementation])
|
||||
AC_DEFINE([HAVE_BSD_ICONV],1,[Konstantin Chuguev's iconv implementation])
|
||||
PHP_DEFINE([PHP_ICONV_IMPL],[\"BSD iconv\"],[ext/iconv])
|
||||
AC_DEFINE([PHP_ICONV_IMPL],["BSD iconv"],[Which iconv implementation to use])
|
||||
;;
|
||||
|
||||
+70
-67
@@ -1909,24 +1909,20 @@ PHP_FUNCTION(iconv_strrpos)
|
||||
Composes a mime header field with field_name and field_value in a specified scheme */
|
||||
PHP_FUNCTION(iconv_mime_encode)
|
||||
{
|
||||
char *field_name;
|
||||
const char *field_name = NULL;
|
||||
int field_name_len;
|
||||
char *field_value;
|
||||
const char *field_value = NULL;
|
||||
int field_value_len;
|
||||
zval *pref;
|
||||
zval val, *pval, **ppval;
|
||||
char *in_charset;
|
||||
char *out_charset;
|
||||
long line_len = 76;
|
||||
zval lfchars;
|
||||
|
||||
php_iconv_enc_scheme_t scheme_id = PHP_ICONV_ENC_SCHEME_BASE64;
|
||||
|
||||
zval *pref = NULL;
|
||||
zval tmp_zv, *tmp_zv_p = NULL;
|
||||
smart_str retval = {0};
|
||||
|
||||
php_iconv_err_t err;
|
||||
|
||||
in_charset = ICONVG(internal_encoding);
|
||||
const char *in_charset = ICONVG(internal_encoding);
|
||||
const char *out_charset = in_charset;
|
||||
long line_len = 76;
|
||||
const char *lfchars = "\r\n";
|
||||
php_iconv_enc_scheme_t scheme_id = PHP_ICONV_ENC_SCHEME_BASE64;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|a",
|
||||
&field_name, &field_name_len, &field_value, &field_value_len,
|
||||
@@ -1935,65 +1931,70 @@ PHP_FUNCTION(iconv_mime_encode)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "scheme", sizeof("scheme"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
switch (Z_STRVAL_PP(ppval)[0]) {
|
||||
case 'B': case 'b':
|
||||
scheme_id = PHP_ICONV_ENC_SCHEME_BASE64;
|
||||
break;
|
||||
if (pref != NULL) {
|
||||
zval **ppval;
|
||||
|
||||
case 'Q': case 'q':
|
||||
scheme_id = PHP_ICONV_ENC_SCHEME_QPRINT;
|
||||
break;
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "scheme", sizeof("scheme"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
switch (Z_STRVAL_PP(ppval)[0]) {
|
||||
case 'B': case 'b':
|
||||
scheme_id = PHP_ICONV_ENC_SCHEME_BASE64;
|
||||
break;
|
||||
|
||||
case 'Q': case 'q':
|
||||
scheme_id = PHP_ICONV_ENC_SCHEME_QPRINT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "input-charset", sizeof("input-charset"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
in_charset = Z_STRVAL_PP(ppval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "output-charset", sizeof("output-charset"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
out_charset = Z_STRVAL_PP(ppval);
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "line-length", sizeof("line-length"), (void **)&ppval) == SUCCESS) {
|
||||
zval val, *pval = *ppval;
|
||||
|
||||
if (Z_TYPE_P(pval) != IS_LONG) {
|
||||
val = *pval;
|
||||
zval_copy_ctor(&val);
|
||||
convert_to_long(&val);
|
||||
pval = &val;
|
||||
}
|
||||
|
||||
line_len = Z_LVAL_P(pval);
|
||||
|
||||
if (pval == &val) {
|
||||
zval_dtor(&val);
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "line-break-chars", sizeof("line-break-chars"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) != IS_STRING) {
|
||||
tmp_zv = **ppval;
|
||||
zval_copy_ctor(&tmp_zv);
|
||||
convert_to_string(&tmp_zv);
|
||||
|
||||
lfchars = Z_STRVAL(tmp_zv);
|
||||
|
||||
tmp_zv_p = &tmp_zv;
|
||||
} else {
|
||||
lfchars = Z_STRVAL_PP(ppval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
in_charset = ICONVG(internal_encoding);
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "input-charset", sizeof("input-charset"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
in_charset = Z_STRVAL_PP(ppval);
|
||||
}
|
||||
}
|
||||
|
||||
out_charset = in_charset;
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "output-charset", sizeof("output-charset"), (void **)&ppval) == SUCCESS) {
|
||||
if (Z_TYPE_PP(ppval) == IS_STRING && Z_STRLEN_PP(ppval) > 0) {
|
||||
out_charset = Z_STRVAL_PP(ppval);
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "line-length", sizeof("line-length"), (void **)&ppval) == SUCCESS) {
|
||||
pval = *ppval;
|
||||
if (Z_TYPE_P(pval) != IS_LONG) {
|
||||
val = *pval;
|
||||
zval_copy_ctor(&val);
|
||||
convert_to_long(&val);
|
||||
pval = &val;
|
||||
}
|
||||
|
||||
line_len = Z_LVAL_P(pval);
|
||||
|
||||
if (pval == &val) {
|
||||
zval_dtor(&val);
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(pref), "line-break-chars", sizeof("line-break-chars"), (void **)&ppval) == SUCCESS) {
|
||||
lfchars = **ppval;
|
||||
zval_copy_ctor(&lfchars);
|
||||
|
||||
if (Z_TYPE(lfchars) != IS_STRING) {
|
||||
convert_to_string(&lfchars);
|
||||
}
|
||||
} else {
|
||||
ZVAL_STRING(&lfchars, "\r\n", 1);
|
||||
}
|
||||
|
||||
err = _php_iconv_mime_encode(&retval, field_name, field_name_len,
|
||||
field_value, field_value_len, line_len, Z_STRVAL(lfchars), scheme_id,
|
||||
field_value, field_value_len, line_len, lfchars, scheme_id,
|
||||
out_charset, in_charset);
|
||||
_php_iconv_show_error(err, out_charset, in_charset TSRMLS_CC);
|
||||
|
||||
@@ -2008,7 +2009,9 @@ PHP_FUNCTION(iconv_mime_encode)
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
||||
zval_dtor(&lfchars);
|
||||
if (tmp_zv_p != NULL) {
|
||||
zval_dtor(tmp_zv_p);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
iconv_mime_encode() sanity cheeck.
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(iconv_mime_encode('', ''));
|
||||
var_dump(iconv_mime_encode('', '', array('line-break-chars' => 1)));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(19) ": =?ISO-8859-1?B??="
|
||||
string(19) ": =?ISO-8859-1?B??="
|
||||
Loaded 100 of 471 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user