mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 12:10:50 +00:00
Compare commits
521
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0411a0187 | ||
|
|
7902154f46 | ||
|
|
44bf966ae7 | ||
|
|
caf18b2bfa | ||
|
|
a55d32948b | ||
|
|
f5d89321e8 | ||
|
|
201569c7f9 | ||
|
|
7e1fa145ee | ||
|
|
d5a7368d72 | ||
|
|
97073a0517 | ||
|
|
e6dd1bee42 | ||
|
|
2be36d43e8 | ||
|
|
cacba2613e | ||
|
|
b10466c3ee | ||
|
|
313ace007d | ||
|
|
8301424d57 | ||
|
|
7d96c874b9 | ||
|
|
fc4dabbbf6 | ||
|
|
10a123f2f8 | ||
|
|
490617c780 | ||
|
|
97e89bfb82 | ||
|
|
317c7ae225 | ||
|
|
a29aa6577d | ||
|
|
a07fe81c38 | ||
|
|
1b9a2471bd | ||
|
|
fd6a541974 | ||
|
|
a0207767c4 | ||
|
|
ba7a46ba54 | ||
|
|
d233c60165 | ||
|
|
093bc03fd5 | ||
|
|
450348fd7a | ||
|
|
13f4cdcca7 | ||
|
|
f4058a30fa | ||
|
|
d3b74b0ec5 | ||
|
|
ddf0954eec | ||
|
|
544beecc55 | ||
|
|
780b300fcf | ||
|
|
a82e35c290 | ||
|
|
eb43932fb1 | ||
|
|
63626d1c68 | ||
|
|
3dc32f41a9 | ||
|
|
4d83ad6282 | ||
|
|
1a3b493d9a | ||
|
|
858745ddf9 | ||
|
|
a17e5fe163 | ||
|
|
44518f05f8 | ||
|
|
d1602669bc | ||
|
|
76d392d3a9 | ||
|
|
94a2ab1990 | ||
|
|
ada89376b4 | ||
|
|
c479074f98 | ||
|
|
e5788c2eb7 | ||
|
|
4f64bc6cfe | ||
|
|
94801d1206 | ||
|
|
0cf43df604 | ||
|
|
a4ecfdb08c | ||
|
|
1a733ccbdd | ||
|
|
473e88e574 | ||
|
|
5955cb64bb | ||
|
|
0d3b976c03 | ||
|
|
a02c9cf4f1 | ||
|
|
ca66964530 | ||
|
|
b73fec0d9f | ||
|
|
1233878300 | ||
|
|
7cb6bc0d50 | ||
|
|
b57e6a484a | ||
|
|
0943b7909a | ||
|
|
6305213066 | ||
|
|
04d0a78649 | ||
|
|
64ddf44bd5 | ||
|
|
1650db955c | ||
|
|
4e03cdce32 | ||
|
|
8a6bb7e993 | ||
|
|
0031c498a3 | ||
|
|
add1f2f783 | ||
|
|
cd98638298 | ||
|
|
dd5c63bc18 | ||
|
|
50292aaff9 | ||
|
|
456eba04a2 | ||
|
|
379c4af44a | ||
|
|
e5f04e5d2f | ||
|
|
30d0600769 | ||
|
|
f0a7020898 | ||
|
|
bb9223391e | ||
|
|
f4a39b5314 | ||
|
|
75a3ee0284 | ||
|
|
4c5d775dd1 | ||
|
|
804d8f2183 | ||
|
|
e48af012eb | ||
|
|
a570698425 | ||
|
|
4ca2a45a0c | ||
|
|
0d12de2d75 | ||
|
|
180e1501bb | ||
|
|
d6597ad37d | ||
|
|
295719fa32 | ||
|
|
6e516e2214 | ||
|
|
e213ff37c3 | ||
|
|
ae85316906 | ||
|
|
79cbb4b143 | ||
|
|
fcfd9f78ab | ||
|
|
0b7fbabd80 | ||
|
|
49b5d46a76 | ||
|
|
01ee1225dc | ||
|
|
c227ea05c4 | ||
|
|
6b582b2c85 | ||
|
|
91f96ef1d7 | ||
|
|
394662b4a2 | ||
|
|
65af72474e | ||
|
|
0512d70c33 | ||
|
|
2253f7dbf7 | ||
|
|
c006bbb006 | ||
|
|
a4f461f9df | ||
|
|
681c35bc17 | ||
|
|
58ba05c901 | ||
|
|
5b6edac5bc | ||
|
|
49470fdc74 | ||
|
|
3f573827c2 | ||
|
|
2f69536e0e | ||
|
|
fbf441a447 | ||
|
|
58a6e8f921 | ||
|
|
c9a701c4d1 | ||
|
|
e000385d10 | ||
|
|
4be5f46e50 | ||
|
|
218f2b42e0 | ||
|
|
3158315a54 | ||
|
|
cc83a160ee | ||
|
|
ba9ef20412 | ||
|
|
1296a72aff | ||
|
|
3c7723a674 | ||
|
|
e3c797aed4 | ||
|
|
44a7348d22 | ||
|
|
a67ec786cc | ||
|
|
fbd807a7b8 | ||
|
|
95c6aa35c7 | ||
|
|
362db6cec6 | ||
|
|
ba4e292b20 | ||
|
|
7c33078b31 | ||
|
|
5393ff76f4 | ||
|
|
588fc6e846 | ||
|
|
1c32084d9d | ||
|
|
078f3abb05 | ||
|
|
8fe6e70d72 | ||
|
|
6567ab4932 | ||
|
|
a9c0b4eaa6 | ||
|
|
cd387e3f9a | ||
|
|
8fd7c98196 | ||
|
|
52105b88b4 | ||
|
|
0bf8ea8b03 | ||
|
|
35b7a1e3f7 | ||
|
|
89347c7c20 | ||
|
|
bd36484d85 | ||
|
|
73bc800428 | ||
|
|
6b38c14911 | ||
|
|
626d78118d | ||
|
|
a9c24d9728 | ||
|
|
9cfdc3a4da | ||
|
|
080e6fd89f | ||
|
|
7f1754653c | ||
|
|
7f84c5e32b | ||
|
|
7e4495a66f | ||
|
|
2e63e4f923 | ||
|
|
2745fef293 | ||
|
|
febe0e0caf | ||
|
|
c1e9d3433d | ||
|
|
e58545fde9 | ||
|
|
40d6477fe5 | ||
|
|
e681512beb | ||
|
|
b3acf2c5c4 | ||
|
|
2ed05398fc | ||
|
|
a5fa2525c8 | ||
|
|
4ee1f9830d | ||
|
|
3aaec591c2 | ||
|
|
5ccc67cc8a | ||
|
|
2b865616f1 | ||
|
|
03aa84f955 | ||
|
|
83b353de2c | ||
|
|
0a9d87e630 | ||
|
|
4942272466 | ||
|
|
001a39d7fb | ||
|
|
85a028b891 | ||
|
|
9a6cf59744 | ||
|
|
6dce4e78ab | ||
|
|
6f871656df | ||
|
|
a4d454fdcf | ||
|
|
782736f277 | ||
|
|
7350e8b884 | ||
|
|
34486b7aae | ||
|
|
fbdc2a9d10 | ||
|
|
a384315b3a | ||
|
|
68e170bec8 | ||
|
|
34a310de8c | ||
|
|
430b4a6531 | ||
|
|
d7d721c96c | ||
|
|
50a7757f0c | ||
|
|
e528918061 | ||
|
|
40ebf7dbc1 | ||
|
|
70a222560d | ||
|
|
71e6b9e504 | ||
|
|
8b06c5cda1 | ||
|
|
9b736b4d22 | ||
|
|
22d260995e | ||
|
|
547fa41064 | ||
|
|
ff707e14e2 | ||
|
|
152fdf118a | ||
|
|
0674cfae43 | ||
|
|
3ae4e31064 | ||
|
|
fd423c6b1d | ||
|
|
db52703bc2 | ||
|
|
3fcf9b11be | ||
|
|
c3738fdca7 | ||
|
|
d6e0e5f7ea | ||
|
|
df26ef5475 | ||
|
|
eeba2141bc | ||
|
|
2285d9bdcc | ||
|
|
b951e33f8d | ||
|
|
6a1c9f5810 | ||
|
|
874f07c893 | ||
|
|
65b3d94fac | ||
|
|
747d019bd3 | ||
|
|
4b4f30017b | ||
|
|
06c2ce0a0d | ||
|
|
a35b6ffd5d | ||
|
|
8224851858 | ||
|
|
fab647746c | ||
|
|
fd1280c6ef | ||
|
|
f6dd7f00db | ||
|
|
5e97bf3de8 | ||
|
|
4b012f7244 | ||
|
|
e2b2ea667f | ||
|
|
6dd737d8ea | ||
|
|
7380c23ab2 | ||
|
|
c3894108b6 | ||
|
|
dde65251f7 | ||
|
|
1be9cff9d3 | ||
|
|
91855505b5 | ||
|
|
36c0a0859a | ||
|
|
49de3e701c | ||
|
|
73d689f230 | ||
|
|
6cd9eb9736 | ||
|
|
1147c223ad | ||
|
|
16a2a11bee | ||
|
|
47a02a0bdf | ||
|
|
afce7aafae | ||
|
|
827f18e200 | ||
|
|
75db37c82c | ||
|
|
44abd52206 | ||
|
|
166713abac | ||
|
|
3dffe40cc4 | ||
|
|
574306adf4 | ||
|
|
a00bdd925a | ||
|
|
855224c8e6 | ||
|
|
4c452ea58f | ||
|
|
6b0c663c40 | ||
|
|
3c20b13648 | ||
|
|
b7d81e26b1 | ||
|
|
d8f6c856af | ||
|
|
7aa8901413 | ||
|
|
0e230a77d0 | ||
|
|
62ef5f3566 | ||
|
|
3fdc0745f1 | ||
|
|
802b4b00bb | ||
|
|
342bafdb2f | ||
|
|
c0bb17abcc | ||
|
|
ed3db800b6 | ||
|
|
a085abe036 | ||
|
|
1679c7b062 | ||
|
|
80a2e3b4be | ||
|
|
19b28876dc | ||
|
|
897ac11952 | ||
|
|
8f1cde33ab | ||
|
|
c8869bea69 | ||
|
|
0f97c6a0e3 | ||
|
|
1816823b2e | ||
|
|
b8c4f047cd | ||
|
|
c8d6f45983 | ||
|
|
dd21c3fd8d | ||
|
|
ebc27e8dce | ||
|
|
2ef3c88773 | ||
|
|
c811399720 | ||
|
|
631b23ce67 | ||
|
|
a410c71e10 | ||
|
|
7faaa41ec2 | ||
|
|
1f5baf17a0 | ||
|
|
243b5f2300 | ||
|
|
bce951557b | ||
|
|
77d8f41d03 | ||
|
|
6c1566eec1 | ||
|
|
fc666e9a95 | ||
|
|
8c4df4a8df | ||
|
|
59e8612456 | ||
|
|
689a54513c | ||
|
|
5d455016e5 | ||
|
|
3f0ed932d3 | ||
|
|
1d7164f92f | ||
|
|
5b7fbcf658 | ||
|
|
aeec3f4abc | ||
|
|
ae0e54dfee | ||
|
|
2b4628c336 | ||
|
|
3f076e4814 | ||
|
|
6d640d80dc | ||
|
|
43796d1f56 | ||
|
|
e2d002e7c0 | ||
|
|
028b68cc1e | ||
|
|
3d43f71772 | ||
|
|
a3623adb8c | ||
|
|
c0b28e5484 | ||
|
|
9dc8030478 | ||
|
|
b935947ca8 | ||
|
|
e2381946db | ||
|
|
32214bf3b2 | ||
|
|
3da25b53bc | ||
|
|
146ca108b0 | ||
|
|
163099f2a9 | ||
|
|
4bfa2b800e | ||
|
|
4db1177ee1 | ||
|
|
bfccdca1d8 | ||
|
|
c0eef1a170 | ||
|
|
a8a212dbd8 | ||
|
|
91c962da95 | ||
|
|
73b74e1418 | ||
|
|
68574f5cdd | ||
|
|
59e73f08ff | ||
|
|
917a493fae | ||
|
|
1afbc301f1 | ||
|
|
81e281f58e | ||
|
|
36872f7754 | ||
|
|
2a853b7065 | ||
|
|
db7b8083c5 | ||
|
|
a1b9bf56cb | ||
|
|
c61f31defe | ||
|
|
ce5c630614 | ||
|
|
8e93d757b3 | ||
|
|
214091ee77 | ||
|
|
13c9761b16 | ||
|
|
147db82b24 | ||
|
|
379f891a21 | ||
|
|
0926b0d102 | ||
|
|
d16912b12a | ||
|
|
440eae3412 | ||
|
|
72818b5c0d | ||
|
|
a10855c574 | ||
|
|
164cff8586 | ||
|
|
bf41267c52 | ||
|
|
54a1e6c07a | ||
|
|
f04cf8344c | ||
|
|
70ae8d742a | ||
|
|
e384dee1a2 | ||
|
|
8463cfb5e3 | ||
|
|
f9e8717683 | ||
|
|
19ec49afc1 | ||
|
|
3666ad8b1a | ||
|
|
75cb09dec4 | ||
|
|
3d37f4d2cd | ||
|
|
7e76730796 | ||
|
|
e3c883e74b | ||
|
|
6509c6edc7 | ||
|
|
c4bef7c8a1 | ||
|
|
27136014a4 | ||
|
|
4ff3a50a06 | ||
|
|
e9b08d1631 | ||
|
|
41491a5199 | ||
|
|
c45f9ec668 | ||
|
|
6dcfd9d13f | ||
|
|
e5a163091e | ||
|
|
09e807d295 | ||
|
|
f0baa2345b | ||
|
|
fc4ccde386 | ||
|
|
1b26a19293 | ||
|
|
b478e36dba | ||
|
|
f056a94455 | ||
|
|
c79b0caf03 | ||
|
|
cd2456bc76 | ||
|
|
be970c09b4 | ||
|
|
511e5c4385 | ||
|
|
9ccca60a1f | ||
|
|
aec129db7f | ||
|
|
2572c0a0e3 | ||
|
|
7447137453 | ||
|
|
be64d7c3de | ||
|
|
c0417eebe7 | ||
|
|
db10c7e0f1 | ||
|
|
4dd9df846a | ||
|
|
fdab057113 | ||
|
|
3d06228b53 | ||
|
|
b4996c4e6a | ||
|
|
ba335a66ac | ||
|
|
6029240086 | ||
|
|
fc6b941f63 | ||
|
|
4a32bb0cbb | ||
|
|
d6900eee6b | ||
|
|
cba2b199cb | ||
|
|
b003639e70 | ||
|
|
5934470390 | ||
|
|
46e1055288 | ||
|
|
68b899703c | ||
|
|
854b50e6e0 | ||
|
|
bbd0a00aed | ||
|
|
7190976fe9 | ||
|
|
d9da89ef29 | ||
|
|
17ccfe0c42 | ||
|
|
3f191da6f1 | ||
|
|
c1d8014e28 | ||
|
|
6c8d41a8fc | ||
|
|
7606d9483e | ||
|
|
5b10ee806f | ||
|
|
9d701ce256 | ||
|
|
15a00ec902 | ||
|
|
8391424f4d | ||
|
|
f835eba6b3 | ||
|
|
cba8f9ce99 | ||
|
|
772260fa09 | ||
|
|
2a28c3b94a | ||
|
|
eaf9597c04 | ||
|
|
ef771fa4d1 | ||
|
|
176a6e48ec | ||
|
|
6f3bf7b276 | ||
|
|
c865371dc1 | ||
|
|
8ba43faa20 | ||
|
|
9140025206 | ||
|
|
964e59d7d5 | ||
|
|
411f43f226 | ||
|
|
541d8e10bb | ||
|
|
72249d7eb0 | ||
|
|
2d69dc25fe | ||
|
|
4de08a612f | ||
|
|
2feb748513 | ||
|
|
1e9fbe762f | ||
|
|
f772c8195a | ||
|
|
155e725a5e | ||
|
|
040729e867 | ||
|
|
bc95def9ca | ||
|
|
e20661c622 | ||
|
|
fc34db9f96 | ||
|
|
27e6105b7d | ||
|
|
dbaa0bc367 | ||
|
|
76144335e9 | ||
|
|
eb701d3fba | ||
|
|
6d8bba6a4a | ||
|
|
2614e6c26a | ||
|
|
f2ede86923 | ||
|
|
8326f69ebf | ||
|
|
9c83000422 | ||
|
|
ac19bb8811 | ||
|
|
d327665b56 | ||
|
|
31705420ae | ||
|
|
d4af6e030c | ||
|
|
86bcb9d8e6 | ||
|
|
912c7fc107 | ||
|
|
f08edd43dc | ||
|
|
eeb4106f00 | ||
|
|
f6994812bd | ||
|
|
173630503a | ||
|
|
f39b13f070 | ||
|
|
4f56135eb8 | ||
|
|
948be2022a | ||
|
|
a2cef56c12 | ||
|
|
7d1bab90e7 | ||
|
|
c6fea156f0 | ||
|
|
90925d817f | ||
|
|
47a2f22ac8 | ||
|
|
81cb38ed75 | ||
|
|
8a03620e1a | ||
|
|
c75458bac3 | ||
|
|
66b5a3680b | ||
|
|
0e58251e38 | ||
|
|
288fdf242b | ||
|
|
7259e7e0d1 | ||
|
|
4e84c36fba | ||
|
|
26420231c8 | ||
|
|
e97b63540d | ||
|
|
bd9fbc11da | ||
|
|
10e87da1d6 | ||
|
|
17ba387824 | ||
|
|
d653cf740b | ||
|
|
84c91b3135 | ||
|
|
539598db31 | ||
|
|
0f490b39f0 | ||
|
|
69093d5dfd | ||
|
|
e0b9d42d25 | ||
|
|
b5d9948f32 | ||
|
|
787ad5fd12 | ||
|
|
6fe420def0 | ||
|
|
7224f5355d | ||
|
|
7b7d26ccb0 | ||
|
|
334a3cefe3 | ||
|
|
112e43d87f | ||
|
|
5efdcb0696 | ||
|
|
1cb5b5e139 | ||
|
|
33803e48e9 | ||
|
|
ec34a3876a | ||
|
|
0c48159953 | ||
|
|
5f5a17d741 | ||
|
|
8e0084d522 | ||
|
|
5f859e2830 | ||
|
|
7fcb28749a | ||
|
|
5e4c8ca731 | ||
|
|
efbaf4327a | ||
|
|
39413a6022 | ||
|
|
66e397f2c9 | ||
|
|
50c1182c4f | ||
|
|
b201d00bde | ||
|
|
c3f10ff73e | ||
|
|
9bab20fbab | ||
|
|
84a696da20 | ||
|
|
19d0000632 | ||
|
|
5a4b7f9c30 | ||
|
|
bb2e9ef00c | ||
|
|
6cd0a77372 | ||
|
|
f137de1506 | ||
|
|
aea9676eb0 | ||
|
|
67524ef7c9 | ||
|
|
a5d9c87d49 | ||
|
|
87cae0e01b | ||
|
|
b4b338a8d1 | ||
|
|
fe29c8def5 | ||
|
|
251851dbb3 | ||
|
|
6416003e95 | ||
|
|
db633a0760 | ||
|
|
aff3259a25 | ||
|
|
9b72bcfd99 | ||
|
|
d2bf5faa4f |
No files matched your search
@@ -148,9 +148,9 @@
|
||||
* Changed all argument parsing to use the new zend_parse_parameters()
|
||||
* If a function is unavailable due to lack of support for a certain
|
||||
feature,
|
||||
do not make the function avaliable, rather then making it print an
|
||||
do not make the function available, rather then making it print an
|
||||
error
|
||||
saying that the functionality offered by the function is not avaliable.
|
||||
saying that the functionality offered by the function is not available.
|
||||
* Lots of WS fixes all over the file.
|
||||
* Change strcpy() to strncpy() to prevent possible buffer overflows.
|
||||
Fixed a bug in ncurses_pair_content(), 1st parameter was wrong.
|
||||
@@ -1384,7 +1384,7 @@
|
||||
2002-12-11 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* ext/exif/exif.c:
|
||||
decode variable is only used when mbstring is avaliable.
|
||||
decode variable is only used when mbstring is available.
|
||||
|
||||
* ext/openssl/openssl.c:
|
||||
ZTS fix.
|
||||
@@ -2193,7 +2193,7 @@
|
||||
2002-12-04 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* ext/gd/gd.c:
|
||||
MFH (build fix, when xpm support is not avaliable).
|
||||
MFH (build fix, when xpm support is not available).
|
||||
|
||||
2002-12-04 Rasmus Lerdorf <rasmus@lerdorf.on.ca>
|
||||
|
||||
@@ -5864,7 +5864,7 @@
|
||||
Compile warning fix.
|
||||
|
||||
* ext/mbstring/tests/overload.phpt:
|
||||
Added a skip condition for when mail() function is not avaliable.
|
||||
Added a skip condition for when mail() function is not available.
|
||||
|
||||
* ext/mbstring/tests/mb_send_mail05.phpt
|
||||
ext/mbstring/tests/mb_send_mail06.phpt:
|
||||
@@ -6758,7 +6758,7 @@
|
||||
ext/standard/tests/strings/htmlentities07.phpt
|
||||
ext/standard/tests/strings/htmlentities08.phpt
|
||||
ext/standard/tests/strings/htmlentities09.phpt:
|
||||
Added skip conditions in the event the required charset is not avaliabled.
|
||||
Added skip conditions in the event the required charset is not availabled.
|
||||
Removed old (commented out) module loading code.
|
||||
|
||||
* run-tests.php:
|
||||
@@ -6766,11 +6766,11 @@
|
||||
|
||||
* ext/pspell/tests/01pspell_basic.phpt:
|
||||
Added a skip condition if the English dictionary needed for the test is not
|
||||
avaliable.
|
||||
available.
|
||||
|
||||
* ext/pcntl/tests/001.phpt:
|
||||
Added a skip condition in the event posix_kill(), which is used by the test
|
||||
is not avaliable.
|
||||
is not available.
|
||||
|
||||
* ext/exif/exif.c:
|
||||
|
||||
@@ -6903,7 +6903,7 @@
|
||||
main/safe_mode.c:
|
||||
|
||||
Instead of checking whether realpath exists based on OS. Use the
|
||||
HAVE_REALPATH define, which is set if realpath() is avaliable. This patch
|
||||
HAVE_REALPATH define, which is set if realpath() is available. This patch
|
||||
also resolves bug #18868.
|
||||
|
||||
2002-11-06 Sascha Schumann <sascha@schumann.cx>
|
||||
@@ -9030,7 +9030,7 @@
|
||||
|
||||
* ext/standard/tests/strings/strtoupper.phpt:
|
||||
Added 'skip logic' to the test on platforms where the locale required by
|
||||
this test is not avaliable.
|
||||
this test is not available.
|
||||
|
||||
2002-10-23 Melvyn Sopacua <msopacua@idg.nl>
|
||||
|
||||
|
||||
+155
-134
@@ -26,26 +26,33 @@ Status legend
|
||||
|
||||
== Server APIs ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
COMMENT: See http://pecl.php.net/package/PHPScript
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2
|
||||
EXTENSION: apache2filter
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
@@ -54,9 +61,10 @@ EXTENSION: cli
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fhttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
EXTENSION: embed
|
||||
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: isapi
|
||||
MAINTENANCE: Unknown
|
||||
@@ -80,7 +88,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: servlet
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -88,8 +96,12 @@ EXTENSION: thttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tux
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: webjames
|
||||
PRIMARY MAINTAINER: Alex Waugh <alex@alexwaugh.com>
|
||||
PRIMARY MAINTAINER: Alex Waugh <alexwaugh@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -97,6 +109,11 @@ STATUS: Experimental
|
||||
|
||||
== Database extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: db
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
|
||||
@@ -109,23 +126,19 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dbx
|
||||
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
|
||||
PRIMARY MAINTAINER: Marc Boeren <mboeren@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
EXTENSION: fbsql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
PRIMARY MAINTAINER: Danny Heijl <danny@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -136,7 +149,7 @@ STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@php.net>, Ard Biesheuvel <abies@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -144,23 +157,37 @@ EXTENSION: msql
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
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: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Tested on phpts and isapi versions
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysql
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@php.net>, Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Dan 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: Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -175,61 +202,25 @@ 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.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== Other extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aspell
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
COMMENT: For aspell .27 and greater, check out the pspell extension
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bz2
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cyrus
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: See http://pecl.php.net/package/bz2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: com
|
||||
PRIMARY MAINTAINER: Harald Radi <h.radi@nme.at>
|
||||
PRIMARY MAINTAINER: Harald Radi <phanto@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -239,12 +230,10 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: crack
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
COMMENT: See http://pecl.php.net/package/crack
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ctype
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -254,10 +243,14 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
EXTENSION: cyrus
|
||||
COMMENT: See http://pecl.php.net/package/cyrus
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: domxml
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
@@ -265,12 +258,12 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dotnet
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
@@ -280,13 +273,15 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fribidi
|
||||
PRIMARY MAINTAINER: Tal Peer <tal@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: See http://pecl.php.net/package/fribidi
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
|
||||
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -304,9 +299,15 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Obsolete
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
@@ -314,12 +315,17 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: imap
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ircg
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -334,26 +340,50 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcal
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: muscat
|
||||
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
|
||||
EXTENSION: mime_magic
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ming
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mnogosearch
|
||||
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
COMMENT: Not tested against windows, only core API completed, rest under development
|
||||
STATUS: Working/Experimental
|
||||
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: notes
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
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>
|
||||
@@ -366,6 +396,10 @@ PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcntl
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -377,25 +411,18 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
PRIMARY MAINTAINER: David Croft <david@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: posix
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: printer
|
||||
PRIMARY MAINTAINER: Daniel Beulshausen <daniel@php4win.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.4
|
||||
COMMENT: Only for Win32
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
PRIMARY MAINTAINER: Vlad Krupin <vlad@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
@@ -410,24 +437,12 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: recode
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sablot
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Obsolete
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: satellite
|
||||
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -443,7 +458,7 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
@@ -454,6 +469,10 @@ MAINTENANCE: Orphaned
|
||||
STATUS: Deprecated (Use the ming swf extension instead)
|
||||
COMMENT: Only for Unix (won't change)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvmsg
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -462,10 +481,14 @@ EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: vpopmail
|
||||
EXTENSION: tokenizer
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: w32api
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
@@ -473,34 +496,32 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlrpc
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xslt
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working (mostly)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
COMMENT: See http://pecl.php.net/package/yaz
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zip
|
||||
COMMENT: See http://pecl.php.net/package/zip
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zziplib
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
# iptc?
|
||||
|
||||
@@ -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
-1
@@ -71,7 +71,7 @@ clean:
|
||||
|
||||
distclean: clean
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
|
||||
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
|
||||
egrep define'.*include/php' $(top_srcdir)/configure|sed 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
|
||||
@@ -1,15 +1,212 @@
|
||||
PHP 4 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
07 Dec 2004, Version 4.3.10RC2
|
||||
11 Jul 2005, Version 4.4.0
|
||||
- Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana)
|
||||
- Added support for .cc files in extensions. (Brian)
|
||||
- Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
|
||||
them sort based on the current locale. (Derick)
|
||||
- Changed sha1_file() and md5_file() functions to use streams instead of
|
||||
low level IO. (Uwe)
|
||||
- Fixed memory corruptions when using references in a wrong way. (Marcus,
|
||||
Dmitry, Derick)
|
||||
- Fixed memory corruption in pg_copy_from() in case the as_null parameter was
|
||||
passed. (Derick)
|
||||
- Fixed memory corruption in stristr(). (Derick)
|
||||
- Fixed bug #32685, #29423 (Segfault when using assignment by reference within
|
||||
function). (Dmitry, Derick)
|
||||
- Fixed bug #33242 (Mangled error message when stream fails). (Derick)
|
||||
- Fixed bug #33222 (segfault when CURL handle is closed in a callback). (Tony)
|
||||
- Fixed bug #33214 (odbc_next_result does not signal SQL errors with
|
||||
2-statement SQL batches). (rich at kastle dot com, Tony)
|
||||
- Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
|
||||
- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
|
||||
misbehave). (Jani)
|
||||
- Fixed bug #33150 (shtool: insecure temporary file creation). (Jani)
|
||||
- Fixed bug #33072 (Add a safemode/open_basedir check for runtime save_path
|
||||
change) (Rasmus)
|
||||
- Fixed bug #33070 (Improved performance of bzdecompress() by several orders
|
||||
of magnitude). (Ilia)
|
||||
- Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
|
||||
RFC 2616 section 10.3.5) (Rasmus, Choitel)
|
||||
- Fixed bug #33019 (socket errors cause memory leaks in php_strerror()).
|
||||
(jwozniak23 at poczta dot onet dot pl, Tony).
|
||||
- Fixed bug #33017 ("make distclean" gives an error with VPATH build). (Jani)
|
||||
- Fixed bug #33013 ("next month" was handled wrong while parsing dates).
|
||||
(Derick)
|
||||
- Fixed bug #32974 (pcntl calls malloc() from a signal handler). (Wez)
|
||||
- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
|
||||
session cookies). (Jani, Tony)
|
||||
- Fixed bug #32936 (http redirects URLs are not checked for control chars). (Ilia)
|
||||
- Fixed bug #32932 (Oracle LDAP: ldap_get_entries invalid pointer). (Jani)
|
||||
- Fixed bug #32904 (pg_get_notify() ignores result_type parameter). (Tony)
|
||||
- Fixed bug #32813 (parse_url() does not handle scheme-only urls properly). (Ilia)
|
||||
- Fixed bug #32810 (temporary files not using plain file wrapper). (Ilia)
|
||||
- Fixed bug #32802 (General cookie overrides more specific cookie). (Ilia)
|
||||
- Fixed bugs #32800, #32830 (ext/odbc: Problems with 64bit systems). (Jani)
|
||||
- Fixed bug #32773 (GMP functions break when second parameter is 0). (Stas)
|
||||
- Fixed bug #32742 (segmentation fault when the stream with a wrapper
|
||||
is not closed). (Tony, Dmitry)
|
||||
- Fixed bug #32730 (ext/crack.c fails to compile with cracklib-2.8.3). (Jani)
|
||||
- Fixed bug #32670 (foreach() does not issue warning on unset array arg). (Ilia)
|
||||
- Fixed bug #32699 (pg_affected_rows() was defined when it was not available).
|
||||
(Derick)
|
||||
- Fixed bug #32682 (ext/mssql: Error on module shutdown when called from
|
||||
activescript). (Frank)
|
||||
- Fixed bug #32647 (Using register_shutdown_function() with invalid callback
|
||||
can crash PHP). (Jani)
|
||||
- Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani)
|
||||
- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
|
||||
(Ilia)
|
||||
- Fixed bug #32587 (Apache2: errors sent to error_log do not include
|
||||
timestamps). (Jani)
|
||||
- Fixed bug #32567 (ext/gmp fails to compile in threadsafe mode). (Tony)
|
||||
- Fixed bug #32538 (ext/swf/swf.c does not compile with gcc-3.4.x or newer).
|
||||
(adam dot greenfield at gmail dot com)
|
||||
- Fixed bug #32530 (chunk_split() does not append endstr if chunklen is
|
||||
longer then the original string). (Ilia)
|
||||
- Fixed bug #32491 (File upload error - unable to create a temporary file).
|
||||
(Uwe Schindler)
|
||||
- Fixed bug #32311 (mb_encode_mimeheader() does not properly escape characters).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #32245 (xml_parser_free() in a function assigned to the xml parser
|
||||
gives a segfault). (Rob)
|
||||
- Fixed bug #32116 (mysql compressed connection doesn't work under windows)
|
||||
(Georg)
|
||||
- Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP
|
||||
response message). (Jani)
|
||||
- Fixed bug #31583 (php_std_date() uses short day names in non-y2k_compliance mode).
|
||||
(mike at php dot net)
|
||||
- Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry)
|
||||
- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin)
|
||||
- Fixed bug #29975 (memory leaks when set_error_handler() is used inside error
|
||||
handler). (Tony)
|
||||
- Fixed bug #29944 (Function defined in switch, crashes). (Dmitry)
|
||||
- Fixed bug #29338 (unencoded spaces get ignored after certain tags). (Ilia)
|
||||
- Fixed bug #28605 (Need to use -[m]ieee option for Alpha CPUs). (Jani)
|
||||
- Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry)
|
||||
|
||||
31 Mar 2005, Version 4.3.11
|
||||
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
|
||||
- Added checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
|
||||
and gmp_fact() to prevent SIGFPE. (Tony)
|
||||
- Changed phpize not to require libtool. (Jani)
|
||||
- Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi)
|
||||
- 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 MacOSX shared extensions crashing on Apache startup. (Rasmus)
|
||||
- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
|
||||
file). (Tony)
|
||||
- Fixed bug #32340 (insert_before($node,NULL) does not return). (Rob)
|
||||
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
|
||||
(Jani)
|
||||
- Fixed bug #32114 (DOM crashing when attribute appended to Document). (Rob)
|
||||
- Fixed bug #32063 (mb_convert_encoding ignores named entity 'alpha').
|
||||
(Moriyoshi)
|
||||
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
|
||||
with NULL values). (Daniel Convissor)
|
||||
- Fixed bug #31936 (set_h_errno() is redefined incompatibly). (Jani)
|
||||
- Fixed bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes).
|
||||
(Moriyoshi)
|
||||
- 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 #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 #31792 (getrusage() does not provide ru_nswap value). (Ilia)
|
||||
- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
|
||||
- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
|
||||
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
|
||||
(elod at itfais dot com)
|
||||
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
|
||||
- Fixed bug #31623 (OCILogin does not support password grace period).
|
||||
(daniel dot beet at accuratesoftware dot com, Tony)
|
||||
- Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia)
|
||||
- Fixed bug #31527 (crash in msg_send() when non-string is stored without
|
||||
being serialized). (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 #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 #31270 (missing safe_mode/open_basedir check in swf_openfile()). (Ilia)
|
||||
- Fixed bug #31174 (compile warning in url.c). (Ilia, lukem at NetBSD dot org)
|
||||
- Fixed bug #31159 (COM object access is not working). (Wez)
|
||||
- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
|
||||
- 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 #31120 (mssql_query returns false on successfull inserts and
|
||||
stored procedures). (Frank)
|
||||
- Fixed bugs #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
|
||||
(Jani)
|
||||
- Fixed bug #31106 (Fixed crash in overloaded objects). (Stas)
|
||||
- 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 #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 #30726 (-.1 like numbers are not being handled correctly). (Ilia)
|
||||
- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
|
||||
- Fixed bug #30573 (compiler warnings in libmbfl due to invalid type cast).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #30549 (incorrect character translations for some ISO8859 charsets).
|
||||
(Moriyoshi)
|
||||
- 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 #30120 (imagettftext() and imagettfbbox() accept too many
|
||||
parameters). (Jani)
|
||||
- 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 #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)
|
||||
- Fixed bug #28804 (ini-file section parsing pattern is buggy).
|
||||
(wendland at scan-plus dot de)
|
||||
- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
|
||||
because of fflush() called on already closed filedescriptor). (Tony)
|
||||
- Fixed bug #28451 (corupt EXIF headers have unlimited recursive IFD directory
|
||||
entries). (Andrei)
|
||||
- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul chars). (Moriyoshi)
|
||||
- Fixed bug #28086 (crash inside overload() function). (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 #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)
|
||||
- Fixed bug #7782 (Cannot use PATH_INFO fully with php isapi). (Unknown)
|
||||
|
||||
15 Dec 2004, Version 4.3.10
|
||||
- Added the %F modifier to *printf to render a non-locale-aware representation
|
||||
of a float with the . as decimal separator. (Derick)
|
||||
- Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
|
||||
- Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
|
||||
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
|
||||
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
|
||||
- Fixed bug #31024 (Crash in fgetcsv() with negative length). (Ilia)
|
||||
- Fixed bug #31019 (Logic error mssql library checking). (Frank)
|
||||
- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
|
||||
- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
|
||||
|
||||
23 Nov 2004, Version 4.3.10RC1
|
||||
- Added the %F modifier to *printf to render a non-locale-aware representation
|
||||
of a float with the . as decimal seperator. (Derick)
|
||||
- Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
|
||||
- Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
|
||||
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
|
||||
- Fixed bug #30826 (Certain reference relations cannot be unserialized
|
||||
properly). (Ilia)
|
||||
- Fixed bug #30750 (Meaningful error message when upload directory is not
|
||||
@@ -44,7 +241,10 @@ PHP 4 NEWS
|
||||
- Fixed bug #29805 (HTTP Authentication Issues). (Uwe Schindler)
|
||||
- Fixed bug #29418 (double free when openssl_csr_new fails).
|
||||
(Kamesh Jayachandran).
|
||||
- Fixed bug #28325 (Circular references not properly serialised). (Moriyoshi)
|
||||
- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
|
||||
- Fixed bug #28325 (Circular references not properly serialized). (Moriyoshi)
|
||||
- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry)
|
||||
|
||||
22 Sep 2004, Version 4.3.9
|
||||
@@ -57,6 +257,8 @@ PHP 4 NEWS
|
||||
- Updated PCRE to provide better error handling in certain cases. (Andrei)
|
||||
- NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
|
||||
for doing performance stats without warnings in server-log. (Uwe Schindler)
|
||||
- Fixed bug preventing from building oci8 as shared.
|
||||
(stanislav dot voroniy at portavita dot nl, Tony)
|
||||
- Fixed leap year checking with idate(). (Christian Schneider, Derick)
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
- Fixed funny forking effect in FastCGI when PHP_FCGI_CHILDREN was not set.
|
||||
|
||||
+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
|
||||
|
||||
@@ -13,9 +13,6 @@ Zend
|
||||
* Allow to set a default value for call-by-reference-parameters.
|
||||
eg: function hello (&$pallo = NULL) {}
|
||||
* Disallow function(method) redefinition in class.
|
||||
* Add configure test to determine if dlsym() requires underscore and set
|
||||
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
|
||||
for example. (DONE?)
|
||||
|
||||
For PHP 5.0.0:
|
||||
* Native large number support (probably with GNU GMP)
|
||||
|
||||
+1
-3
@@ -25,12 +25,12 @@ Fixed:
|
||||
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
|
||||
ext/exif, ext/dba (Marcus)
|
||||
php_base64_encode (Moriyoshi)
|
||||
pack (Ilia)
|
||||
|
||||
Open:
|
||||
|
||||
the dbase extension (1)
|
||||
socket_select (2)
|
||||
pack (3)
|
||||
|
||||
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
|
||||
this or not might depend on your libc/compiler. Hard to track down,
|
||||
@@ -70,8 +70,6 @@ Methodology
|
||||
|
||||
echo dbase_open | php do_crash.txt
|
||||
|
||||
(3) multiple integer overflows, ex. pack("d4294967297", 2);
|
||||
|
||||
Amendment 1.
|
||||
|
||||
CFLAGS='-O0 -g' \
|
||||
|
||||
+2
-2
@@ -285,11 +285,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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
/* #ifndef WIN32 */
|
||||
#if !defined(WIN32) && !defined(NETWARE)
|
||||
# include "tsrm_config.h"
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
+4
-4
@@ -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>
|
||||
@@ -100,7 +100,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 +154,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
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#elif defined(NETWARE)
|
||||
# include "tsrm_config.nw.h"
|
||||
#else
|
||||
# include "tsrm_config.h"
|
||||
# include <tsrm_config.h>
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -852,7 +852,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;
|
||||
}
|
||||
|
||||
+158
-20
@@ -1,4 +1,4 @@
|
||||
dnl $Id$
|
||||
dnl $Id$ -*- autoconf -*-
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
@@ -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;])
|
||||
])
|
||||
|
||||
@@ -28,9 +28,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
|
||||
@@ -129,7 +143,7 @@ dnl append to the array which has been dynamically chosen at m4 time
|
||||
dnl choose the right compiler/flags/etc. for the source-file
|
||||
case $ac_src in
|
||||
*.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
|
||||
*.cpp[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
|
||||
*.cpp|*.cc[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
|
||||
esac
|
||||
|
||||
dnl create a rule for the object/source combo
|
||||
@@ -277,6 +291,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
|
||||
@@ -775,12 +790,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
|
||||
|
||||
@@ -1160,14 +1180,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
|
||||
])
|
||||
@@ -1559,7 +1591,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
|
||||
])
|
||||
@@ -1584,6 +1616,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
|
||||
@@ -1594,13 +1684,24 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
unset OPENSSL_INCDIR
|
||||
unset OPENSSL_LIBDIR
|
||||
|
||||
dnl Empty variable means 'no'
|
||||
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
|
||||
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
|
||||
|
||||
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`
|
||||
@@ -1614,15 +1715,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
|
||||
@@ -1680,11 +1782,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,8 +1801,17 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
found_iconv=no
|
||||
unset ICONV_DIR
|
||||
|
||||
# Create the directories for a VPATH build:
|
||||
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
|
||||
@@ -1853,3 +1964,30 @@ IFS="- /.
|
||||
APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
|
||||
])
|
||||
|
||||
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
|
||||
])
|
||||
+9
-10
@@ -14,7 +14,7 @@
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include generated_lists
|
||||
@@ -32,6 +32,10 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
targets = $(TOUCH_FILES) configure $(config_h_in)
|
||||
|
||||
PHP_AUTOCONF ?= 'autoconf'
|
||||
PHP_AUTOHEADER ?= 'autoheader'
|
||||
|
||||
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 +43,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)
|
||||
$(PHP_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)
|
||||
$(PHP_AUTOCONF) $(SUPPRESS_WARNINGS)
|
||||
|
||||
+7
-41
@@ -16,15 +16,20 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.21.2.6 2003-09-28 13:37:59 tal Exp $
|
||||
# $Id: buildcheck.sh,v 1.21.2.13 2005-04-07 23:33:50 jon Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
|
||||
stamp=$1
|
||||
|
||||
# Allow the autoconf executable to be overridden by $PHP_AUTOCONF.
|
||||
if test -z "$PHP_AUTOCONF"; then
|
||||
PHP_AUTOCONF='autoconf'
|
||||
fi
|
||||
|
||||
# autoconf 2.13 or newer
|
||||
ac_version=`autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$ac_version"; then
|
||||
echo "buildconf: autoconf not found."
|
||||
echo " You need autoconf version 2.13 or newer installed"
|
||||
@@ -41,7 +46,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 +54,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
+228
-151
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## GNU shtool -- The GNU Portable Shell Tool
|
||||
## Copyright (c) 1994-2002 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1994-2005 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
## See http://www.gnu.org/software/shtool/ for more information.
|
||||
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
|
||||
##
|
||||
## Version: 1.6.2 (02-Nov-2002)
|
||||
## Version: 2.0.2 (15-Jun-2005)
|
||||
## Contents: 4/19 available modules
|
||||
##
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
## rotate Logfile rotation
|
||||
## tarball Roll distribution tarballs
|
||||
## subst Apply sed(1) substitution operations
|
||||
## guessos Simple operating system guesser
|
||||
## platform Platform Identification Utility
|
||||
## arx Extended archive command
|
||||
## slo Separate linker options by library class
|
||||
## scpp Sharing C Pre-Processor
|
||||
@@ -66,9 +66,9 @@ if [ $# -eq 0 ]; then
|
||||
echo "$0:Hint: run \`$0 -h' for usage" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo "This is GNU shtool, version 1.6.2 (02-Nov-2002)"
|
||||
echo "Copyright (c) 1994-2002 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
|
||||
echo "This is GNU shtool, version 2.0.2 (15-Jun-2005)"
|
||||
echo "Copyright (c) 1994-2005 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
echo "Report bugs to <bug-shtool@gnu.org>"
|
||||
echo ''
|
||||
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
|
||||
@@ -80,7 +80,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo ' -r, --recreate recreate this shtool script via shtoolize'
|
||||
echo ''
|
||||
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
|
||||
echo ' echo [-n|--newline] [-e|--expand] [<str> ...]'
|
||||
echo ' echo [-n|--newline] [-e|--expand] [<string> ...]'
|
||||
echo ' install [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy]'
|
||||
echo ' [-C|--compare-copy] [-s|--strip] [-m|--mode <mode>]'
|
||||
echo ' [-o|--owner <owner>] [-g|--group <group>] [-e|--exec'
|
||||
@@ -106,17 +106,21 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo ' rotate [-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files'
|
||||
echo ' <count>] [-s|--size <size>] [-c|--copy] [-r|--remove]'
|
||||
echo ' [-a|--archive-dir <dir>] [-z|--compress [<tool>:]<level>]'
|
||||
echo ' [-b|--background] [-d|--delay] [-p|--pad <len>] [-o|--owner'
|
||||
echo ' <owner>] [-g|--group <group>] [-m|--mode <mode>] [-M|--migrate'
|
||||
echo ' [-b|--background] [-d|--delay] [-p|--pad <len>] [-m|--mode'
|
||||
echo ' <mode>] [-o|--owner <owner>] [-g|--group <group>] [-M|--migrate'
|
||||
echo ' <cmd>] [-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]'
|
||||
echo ' tarball [-t|--trace] [-v|--verbose] [-o|--output <tarball>]'
|
||||
echo ' [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
|
||||
echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
|
||||
echo ' <path> [<path> ...]'
|
||||
echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth]'
|
||||
echo ' [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>]'
|
||||
echo ' [-f|--file <cmd-file>] [<file>] [...]'
|
||||
echo ' guessos '
|
||||
echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning]'
|
||||
echo ' [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup'
|
||||
echo ' <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>]'
|
||||
echo ' [...]'
|
||||
echo ' platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
|
||||
echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
|
||||
echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
|
||||
echo ' [-V|--version] [-h|--help]'
|
||||
echo ' arx [-t|--trace] [-C|--command <cmd>] <op> <archive> [<file>'
|
||||
echo ' ...]'
|
||||
echo ' slo [-p|--prefix <str>] -- -L<dir> -l<lib> [-L<dir> -l<lib>'
|
||||
@@ -131,15 +135,15 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo ''
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
|
||||
echo "GNU shtool 1.6.2 (02-Nov-2002)"
|
||||
if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
|
||||
echo "GNU shtool 2.0.2 (15-Jun-2005)"
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
|
||||
if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
|
||||
shtoolize -oshtool echo install mkdir path
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
|
||||
if [ ".$1" = ".-d" ] || [ ".$1" = ".--debug" ]; then
|
||||
shift
|
||||
set -x
|
||||
fi
|
||||
@@ -166,7 +170,7 @@ gen_tmpfile=no
|
||||
case $tool in
|
||||
echo )
|
||||
str_tool="echo"
|
||||
str_usage="[-n|--newline] [-e|--expand] [<str> ...]"
|
||||
str_usage="[-n|--newline] [-e|--expand] [<string> ...]"
|
||||
arg_spec="0+"
|
||||
opt_spec="n.e."
|
||||
opt_alias="n:newline,e:expand"
|
||||
@@ -261,7 +265,7 @@ eval `echo h.$opt_spec |\
|
||||
|
||||
# parse option alias string
|
||||
eval `echo h:help,$opt_alias |\
|
||||
tr 'x-' 'x_' | sed -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
|
||||
sed -e 's/-/_/g' -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
|
||||
|
||||
# interate over argument line
|
||||
opt_PREV=''
|
||||
@@ -286,12 +290,12 @@ while [ $# -gt 0 ]; do
|
||||
--[a-zA-Z0-9]*=*)
|
||||
eval `echo "x$1" |\
|
||||
sed -e 's/^x--\([a-zA-Z0-9-]*\)=\(.*\)$/opt_OPT="\1";opt_ARG="\2"/'`
|
||||
opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
|
||||
opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
|
||||
eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
|
||||
;;
|
||||
--[a-zA-Z0-9]*)
|
||||
opt_OPT=`echo "x$1" | cut -c4-`
|
||||
opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
|
||||
opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
|
||||
eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
|
||||
opt_ARG=''
|
||||
;;
|
||||
@@ -315,8 +319,8 @@ while [ $# -gt 0 ]; do
|
||||
|
||||
# determine whether option needs an argument
|
||||
eval "opt_MODE=\$opt_MODE_${opt_OPT}"
|
||||
if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then
|
||||
if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then
|
||||
if [ ".$opt_ARG" = . ] && [ ".$opt_ARG_OK" != .yes ]; then
|
||||
if [ ".$opt_MODE" = ".:" ] || [ ".$opt_MODE" = ".+" ]; then
|
||||
opt_PREV="$opt_OPT"
|
||||
continue
|
||||
fi
|
||||
@@ -375,6 +379,7 @@ esac
|
||||
|
||||
# establish a temporary file on request
|
||||
if [ ".$gen_tmpfile" = .yes ]; then
|
||||
# create (explicitly) secure temporary directory
|
||||
if [ ".$TMPDIR" != . ]; then
|
||||
tmpdir="$TMPDIR"
|
||||
elif [ ".$TEMPDIR" != . ]; then
|
||||
@@ -382,12 +387,40 @@ if [ ".$gen_tmpfile" = .yes ]; then
|
||||
else
|
||||
tmpdir="/tmp"
|
||||
fi
|
||||
tmpfile="$tmpdir/.shtool.$$"
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
touch $tmpfile
|
||||
chmod 600 $tmpfile
|
||||
tmpdir="$tmpdir/.shtool.$$"
|
||||
( umask 077
|
||||
rm -rf "$tmpdir" >/dev/null 2>&1 || true
|
||||
mkdir "$tmpdir" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
)
|
||||
|
||||
# create (implicitly) secure temporary file
|
||||
tmpfile="$tmpdir/shtool.tmp"
|
||||
touch "$tmpfile"
|
||||
fi
|
||||
|
||||
# utility function: map string to lower case
|
||||
util_lower () {
|
||||
echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
|
||||
}
|
||||
|
||||
# utility function: map string to upper case
|
||||
util_upper () {
|
||||
echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
}
|
||||
|
||||
# cleanup procedure
|
||||
shtool_exit () {
|
||||
rc="$1"
|
||||
if [ ".$gen_tmpfile" = .yes ]; then
|
||||
rm -rf "$tmpdir" >/dev/null 2>&1 || true
|
||||
fi
|
||||
exit $rc
|
||||
}
|
||||
|
||||
##
|
||||
## DISPATCH INTO SCRIPT BODY
|
||||
##
|
||||
@@ -397,12 +430,11 @@ case $tool in
|
||||
echo )
|
||||
##
|
||||
## echo -- Print string with optional construct expansion
|
||||
## Copyright (c) 1998-2002 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for WML as buildinfo
|
||||
## Copyright (c) 1998-2005 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
|
||||
|
||||
text="$*"
|
||||
|
||||
|
||||
# check for broken escape sequence expansion
|
||||
seo=''
|
||||
bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
|
||||
@@ -412,18 +444,18 @@ echo )
|
||||
seo='-E'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# check for existing -n option (to suppress newline)
|
||||
minusn=''
|
||||
bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'`
|
||||
if [ ".$bytes" = .3 ]; then
|
||||
minusn='-n'
|
||||
fi
|
||||
|
||||
|
||||
# determine terminal bold sequence
|
||||
term_bold=''
|
||||
term_norm=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[Bb]'`" != . ]; then
|
||||
case $TERM in
|
||||
# for the most important terminal types we directly know the sequences
|
||||
xterm|xterm*|vt220|vt220*)
|
||||
@@ -459,96 +491,139 @@ echo )
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
|
||||
if [ ".$term_bold" != . ] && [ ".$term_norm" != . ]; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
|
||||
if [ ".$term_bold" = . ] || [ ".$term_norm" = . ]; then
|
||||
echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
|
||||
term_bold=''
|
||||
term_norm=''
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# determine user name
|
||||
username=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uUgG]'`" != . ]; then
|
||||
username="$LOGNAME"
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[uUgG]'`" != . ]; then
|
||||
username="`(id -un) 2>/dev/null`"
|
||||
if [ ".$username" = . ]; then
|
||||
username="$USER"
|
||||
if [ ".$username" = . ]; then
|
||||
username="`(whoami) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$username" = . ]; then
|
||||
username="`(who am i) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$username" = . ]; then
|
||||
username='unknown'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# determine user id
|
||||
userid=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%U'`" != . ]; then
|
||||
userid="`(id -u) 2>/dev/null`"
|
||||
if [ ".$userid" = . ]; then
|
||||
str="`(id) 2>/dev/null`"
|
||||
if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
|
||||
userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'`
|
||||
username=`echo $str | sed -e 's/^uid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
|
||||
fi
|
||||
if [ ".$userid" = . ]; then
|
||||
userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$userid" = . ]; then
|
||||
userid=`(ypcat passwd) 2>/dev/null |
|
||||
egrep "^${username}:" | \
|
||||
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$userid" = . ]; then
|
||||
userid='?'
|
||||
if [ ".$username" = . ]; then
|
||||
username="$LOGNAME"
|
||||
if [ ".$username" = . ]; then
|
||||
username="$USER"
|
||||
if [ ".$username" = . ]; then
|
||||
username="`(whoami) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$username" = . ]; then
|
||||
username="`(who am i) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$username" = . ]; then
|
||||
username='unknown'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# determine user id
|
||||
userid=''
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%U'`" != . ]; then
|
||||
userid="`(id -u) 2>/dev/null`"
|
||||
if [ ".$userid" = . ]; then
|
||||
userid="`(id -u ${username}) 2>/dev/null`"
|
||||
if [ ".$userid" = . ]; then
|
||||
str="`(id) 2>/dev/null`"
|
||||
if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
|
||||
userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*$//'`
|
||||
fi
|
||||
if [ ".$userid" = . ]; then
|
||||
userid=`(getent passwd ${username}) 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$userid" = . ]; then
|
||||
userid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$userid" = . ]; then
|
||||
userid=`(ypcat passwd) 2>/dev/null |
|
||||
grep "^${username}:" | \
|
||||
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$userid" = . ]; then
|
||||
userid='?'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# determine (primary) group id
|
||||
groupid=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[gG]'`" != . ]; then
|
||||
groupid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[gG]'`" != . ]; then
|
||||
groupid="`(id -g ${username}) 2>/dev/null`"
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
str="`(id) 2>/dev/null`"
|
||||
if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
|
||||
groupid=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*//' -e 's/(.*$//'`
|
||||
fi
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid='?'
|
||||
groupid=`(getent passwd ${username}) 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid=`(ypcat passwd) 2>/dev/null | grep "^${username}:" | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid='?'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# determine (primary) group name
|
||||
groupname=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%g'`" != . ]; then
|
||||
groupname=`egrep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
|
||||
sed -e 's/:.*$//'`
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%g'`" != . ]; then
|
||||
groupname="`(id -gn ${username}) 2>/dev/null`"
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname=`(ypcat group) 2>/dev/null | \
|
||||
egrep "^[^:]*:[^:]*:${groupid}:" | \
|
||||
sed -e 's/:.*$//'`
|
||||
str="`(id) 2>/dev/null`"
|
||||
if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
|
||||
groupname=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
|
||||
fi
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname='?'
|
||||
groupname=`(getent group) 2>/dev/null | \
|
||||
grep "^[^:]*:[^:]*:${groupid}:" | \
|
||||
sed -e 's/:.*$//'`
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname=`grep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
|
||||
sed -e 's/:.*$//'`
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname=`(ypcat group) 2>/dev/null | \
|
||||
grep "^[^:]*:[^:]*:${groupid}:" | \
|
||||
sed -e 's/:.*$//'`
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname='?'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# determine host and domain name
|
||||
hostname=''
|
||||
domainname=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%h'`" != . ]; then
|
||||
hostname="`(uname -n) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$hostname" = . ]; then
|
||||
@@ -565,16 +640,16 @@ echo )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%d'`" != . ]; then
|
||||
if [ ".$domainname" = . ]; then
|
||||
if [ -f /etc/resolv.conf ]; then
|
||||
domainname="`egrep '^[ ]*domain' /etc/resolv.conf | sed -e 'q' |\
|
||||
domainname="`grep '^[ ]*domain' /etc/resolv.conf | sed -e 'q' |\
|
||||
sed -e 's/.*domain//' \
|
||||
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
|
||||
-e 's/^\.//' -e 's/^/./' |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
if [ ".$domainname" = . ]; then
|
||||
domainname="`egrep '^[ ]*search' /etc/resolv.conf | sed -e 'q' |\
|
||||
domainname="`grep '^[ ]*search' /etc/resolv.conf | sed -e 'q' |\
|
||||
sed -e 's/.*search//' \
|
||||
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
|
||||
-e 's/ .*//' -e 's/ .*//' \
|
||||
@@ -584,13 +659,13 @@ echo )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# determine current time
|
||||
time_day=''
|
||||
time_month=''
|
||||
time_year=''
|
||||
time_monthname=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then
|
||||
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[DMYm]'`" != . ]; then
|
||||
time_day=`date '+%d'`
|
||||
time_month=`date '+%m'`
|
||||
time_year=`date '+%Y' 2>/dev/null`
|
||||
@@ -616,7 +691,7 @@ echo )
|
||||
12) time_monthname='Dec' ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# expand special ``%x'' constructs
|
||||
if [ ".$opt_e" = .yes ]; then
|
||||
text=`echo $seo "$text" |\
|
||||
@@ -633,7 +708,7 @@ echo )
|
||||
-e "s/%Y/${time_year}/g" \
|
||||
-e "s/%m/${time_monthname}/g" 2>/dev/null`
|
||||
fi
|
||||
|
||||
|
||||
# create output
|
||||
if [ .$opt_n = .no ]; then
|
||||
echo $seo "$text"
|
||||
@@ -646,15 +721,16 @@ echo )
|
||||
echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text"
|
||||
fi
|
||||
fi
|
||||
|
||||
shtool_exit 0
|
||||
;;
|
||||
|
||||
install )
|
||||
##
|
||||
## install -- Install a program, script or datafile
|
||||
## Copyright (c) 1997-2002 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for shtool
|
||||
## Copyright (c) 1997-2005 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
|
||||
|
||||
# special case: "shtool install -d <dir> [...]" internally
|
||||
# maps to "shtool mkdir -f -p -m 755 <dir> [...]"
|
||||
if [ "$opt_d" = yes ]; then
|
||||
@@ -672,11 +748,11 @@ install )
|
||||
cmd="$cmd -t"
|
||||
fi
|
||||
for dir in "$@"; do
|
||||
eval "$cmd $dir" || exit $?
|
||||
eval "$cmd $dir" || shtool_exit $?
|
||||
done
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
|
||||
|
||||
# determine source(s) and destination
|
||||
argc=$#
|
||||
srcs=""
|
||||
@@ -685,30 +761,30 @@ install )
|
||||
shift
|
||||
done
|
||||
dstpath="$1"
|
||||
|
||||
|
||||
# type check for destination
|
||||
dstisdir=0
|
||||
if [ -d $dstpath ]; then
|
||||
dstpath=`echo "$dstpath" | sed -e 's:/$::'`
|
||||
dstisdir=1
|
||||
fi
|
||||
|
||||
|
||||
# consistency check for destination
|
||||
if [ $argc -gt 2 -a $dstisdir = 0 ]; then
|
||||
if [ $argc -gt 2 ] && [ $dstisdir = 0 ]; then
|
||||
echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
|
||||
exit 1
|
||||
shtool_exit 1
|
||||
fi
|
||||
|
||||
|
||||
# iterate over all source(s)
|
||||
for src in $srcs; do
|
||||
dst=$dstpath
|
||||
|
||||
|
||||
# if destination is a directory, append the input filename
|
||||
if [ $dstisdir = 1 ]; then
|
||||
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
|
||||
dst="$dst/$dstfile"
|
||||
fi
|
||||
|
||||
|
||||
# check for correct arguments
|
||||
if [ ".$src" = ".$dst" ]; then
|
||||
echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
|
||||
@@ -718,17 +794,17 @@ install )
|
||||
echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
# make a temp file name in the destination directory
|
||||
dsttmp=`echo $dst |\
|
||||
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
|
||||
-e "s;\$;/#INST@$$#;"`
|
||||
|
||||
|
||||
# verbosity
|
||||
if [ ".$opt_v" = .yes ]; then
|
||||
echo "$src -> $dst" 1>&2
|
||||
fi
|
||||
|
||||
|
||||
# copy or move the file name to the temp name
|
||||
# (because we might be not allowed to change the source)
|
||||
if [ ".$opt_C" = .yes ]; then
|
||||
@@ -738,14 +814,14 @@ install )
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "cp $src $dsttmp" 1>&2
|
||||
fi
|
||||
cp $src $dsttmp || exit $?
|
||||
cp $src $dsttmp || shtool_exit $?
|
||||
else
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "mv $src $dsttmp" 1>&2
|
||||
fi
|
||||
mv $src $dsttmp || exit $?
|
||||
mv $src $dsttmp || shtool_exit $?
|
||||
fi
|
||||
|
||||
|
||||
# adjust the target file
|
||||
if [ ".$opt_e" != . ]; then
|
||||
sed='sed'
|
||||
@@ -755,34 +831,35 @@ install )
|
||||
sed="$sed -e '$e'"
|
||||
done
|
||||
cp $dsttmp $dsttmp.old
|
||||
eval "$sed <$dsttmp.old >$dsttmp" || exit $?
|
||||
chmod u+w $dsttmp
|
||||
eval "$sed <$dsttmp.old >$dsttmp" || shtool_exit $?
|
||||
rm -f $dsttmp.old
|
||||
fi
|
||||
if [ ".$opt_s" = .yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "strip $dsttmp" 1>&2
|
||||
fi
|
||||
strip $dsttmp || exit $?
|
||||
strip $dsttmp || shtool_exit $?
|
||||
fi
|
||||
if [ ".$opt_o" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chown $opt_o $dsttmp" 1>&2
|
||||
fi
|
||||
chown $opt_o $dsttmp || exit $?
|
||||
chown $opt_o $dsttmp || shtool_exit $?
|
||||
fi
|
||||
if [ ".$opt_g" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chgrp $opt_g $dsttmp" 1>&2
|
||||
fi
|
||||
chgrp $opt_g $dsttmp || exit $?
|
||||
chgrp $opt_g $dsttmp || shtool_exit $?
|
||||
fi
|
||||
if [ ".$opt_m" != ".-" ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chmod $opt_m $dsttmp" 1>&2
|
||||
fi
|
||||
chmod $opt_m $dsttmp || exit $?
|
||||
chmod $opt_m $dsttmp || shtool_exit $?
|
||||
fi
|
||||
|
||||
|
||||
# determine whether to do a quick install
|
||||
# (has to be done _after_ the strip was already done)
|
||||
quick=no
|
||||
@@ -793,7 +870,7 @@ install )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# finally, install the file to the real destination
|
||||
if [ $quick = yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
@@ -807,21 +884,21 @@ install )
|
||||
rm -f $dst && mv $dsttmp $dst
|
||||
fi
|
||||
done
|
||||
|
||||
shtool_exit 0
|
||||
;;
|
||||
|
||||
mkdir )
|
||||
##
|
||||
## mkdir -- Make one or more directories
|
||||
## Copyright (c) 1996-2002 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
## Cleaned up and enhanced for shtool
|
||||
## Copyright (c) 1996-2005 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
|
||||
|
||||
errstatus=0
|
||||
for p in ${1+"$@"}; do
|
||||
# if the directory already exists...
|
||||
if [ -d "$p" ]; then
|
||||
if [ ".$opt_f" = .no -a ".$opt_p" = .no ]; then
|
||||
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
|
||||
echo "$msgprefix:Error: directory already exists: $p" 1>&2
|
||||
errstatus=1
|
||||
break
|
||||
@@ -895,32 +972,32 @@ mkdir )
|
||||
done
|
||||
fi
|
||||
done
|
||||
exit $errstatus
|
||||
|
||||
shtool_exit $errstatus
|
||||
;;
|
||||
|
||||
path )
|
||||
##
|
||||
## path -- Deal with program paths
|
||||
## Copyright (c) 1998-2002 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for Apache
|
||||
## Copyright (c) 1998-2005 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
|
||||
|
||||
namelist="$*"
|
||||
|
||||
|
||||
# check whether the test command supports the -x option
|
||||
if [ -x /bin/sh ] 2>/dev/null; then
|
||||
minusx="-x"
|
||||
else
|
||||
minusx="-r"
|
||||
fi
|
||||
|
||||
|
||||
# split path string
|
||||
paths="`echo $opt_p |\
|
||||
sed -e 's/^:/.:/' \
|
||||
-e 's/::/:.:/g' \
|
||||
-e 's/:$/:./' \
|
||||
-e 's/:/ /g'`"
|
||||
|
||||
|
||||
# SPECIAL REQUEST
|
||||
# translate forward to reverse path
|
||||
if [ ".$opt_r" = .yes ]; then
|
||||
@@ -933,25 +1010,25 @@ path )
|
||||
done
|
||||
fi
|
||||
echo $rp | sed -e 's:/$::'
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
|
||||
|
||||
# SPECIAL REQUEST
|
||||
# strip out directory or base name
|
||||
if [ ".$opt_d" = .yes ]; then
|
||||
echo "$namelist" |\
|
||||
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
if [ ".$opt_b" = .yes ]; then
|
||||
echo "$namelist" |\
|
||||
sed -e 's;.*/\([^/]*\)$;\1;'
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
|
||||
|
||||
# MAGIC SITUATION
|
||||
# Perl Interpreter (perl)
|
||||
if [ ".$opt_m" = .yes -a ".$namelist" = .perl ]; then
|
||||
if [ ".$opt_m" = .yes ] && [ ".$namelist" = .perl ]; then
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
touch $tmpfile
|
||||
found=0
|
||||
@@ -960,7 +1037,7 @@ path )
|
||||
dir=`echo $dir | sed -e 's;/*$;;'`
|
||||
nc=99
|
||||
for name in perl perl5 miniperl; do
|
||||
if [ $minusx "$dir/$name" -a ! -d "$dir/$name" ]; then
|
||||
if [ $minusx "$dir/$name" ] && [ ! -d "$dir/$name" ]; then
|
||||
perl="$dir/$name"
|
||||
pv=`$perl -e 'printf("%.3f", $]);'`
|
||||
echo "$pv:$pc:$nc:$perl" >>$tmpfile
|
||||
@@ -974,15 +1051,15 @@ path )
|
||||
perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
echo "$perl"
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
exit 1
|
||||
shtool_exit 1
|
||||
fi
|
||||
|
||||
|
||||
# MAGIC SITUATION
|
||||
# C pre-processor (cpp)
|
||||
if [ ".$opt_m" = .yes -a ".$namelist" = .cpp ]; then
|
||||
if [ ".$opt_m" = .yes ] && [ ".$namelist" = .cpp ]; then
|
||||
echo >$tmpfile.c "#include <assert.h>"
|
||||
echo >>$tmpfile.c "Syntax Error"
|
||||
# 1. try the standard cc -E approach
|
||||
@@ -998,7 +1075,7 @@ path )
|
||||
# 3. try a standalone cpp command in path and lib dirs
|
||||
for path in $paths /lib /usr/lib /usr/local/lib; do
|
||||
path=`echo $path | sed -e 's;/*$;;'`
|
||||
if [ $minusx "$path/cpp" -a ! -d "$path/cpp" ]; then
|
||||
if [ $minusx "$path/cpp" ] && [ ! -d "$path/cpp" ]; then
|
||||
cpp="$path/cpp"
|
||||
break
|
||||
fi
|
||||
@@ -1017,30 +1094,30 @@ path )
|
||||
rm -f $tmpfile.c $tmpfile.out >/dev/null 2>&1
|
||||
if [ ".$cpp" != . ]; then
|
||||
echo "$cpp"
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
exit 1
|
||||
shtool_exit 1
|
||||
fi
|
||||
|
||||
|
||||
# STANDARD SITUATION
|
||||
# iterate over names
|
||||
for name in $namelist; do
|
||||
# iterate over paths
|
||||
for path in $paths; do
|
||||
path=`echo $path | sed -e 's;/*$;;'`
|
||||
if [ $minusx "$path/$name" -a ! -d "$path/$name" ]; then
|
||||
if [ $minusx "$path/$name" ] && [ ! -d "$path/$name" ]; then
|
||||
if [ ".$opt_s" != .yes ]; then
|
||||
echo "$path/$name"
|
||||
fi
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
fi
|
||||
done
|
||||
done
|
||||
exit 1
|
||||
|
||||
shtool_exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
exit 0
|
||||
shtool_exit 0
|
||||
|
||||
##EOF##
|
||||
@@ -3,62 +3,71 @@
|
||||
|
||||
eval `grep '^EXTRA_VERSION=' configure.in`
|
||||
case "$EXTRA_VERSION" in
|
||||
*-dev)
|
||||
dev=1
|
||||
;;
|
||||
*)
|
||||
dev=0
|
||||
;;
|
||||
*-dev)
|
||||
dev=1
|
||||
;;
|
||||
*)
|
||||
dev=0
|
||||
;;
|
||||
esac
|
||||
|
||||
devok=0
|
||||
debug=no
|
||||
|
||||
while test $# -gt 0; do
|
||||
if test "$1" = "--copy"; then
|
||||
automake_flags=--copy
|
||||
fi
|
||||
if test "$1" = "--copy"; then
|
||||
automake_flags=--copy
|
||||
fi
|
||||
|
||||
if test "$1" = "--force"; then
|
||||
devok=1
|
||||
echo "Forcing buildconf"
|
||||
fi
|
||||
if test "$1" = "--force"; then
|
||||
devok=1
|
||||
echo "Forcing buildconf"
|
||||
fi
|
||||
|
||||
shift
|
||||
if test "$1" = "--debug"; then
|
||||
debug=yes
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if test "$dev" = "0" -a "$devok" = "0"; then
|
||||
echo "You should not run buildconf in a release package."
|
||||
echo "use buildconf --force to override this check."
|
||||
exit 1
|
||||
echo "You should not run buildconf in a release package."
|
||||
echo "use buildconf --force to override this check."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$ZENDDIR"; then
|
||||
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
|
||||
v=5
|
||||
else
|
||||
v=4
|
||||
fi
|
||||
|
||||
if test "$v" = "5"; then
|
||||
if test -r "Zend/OBJECTS2_HOWTO"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine1 2>/dev/null
|
||||
mv ZendEngine2 Zend
|
||||
fi
|
||||
else
|
||||
if test -r "Zend/zend_execute_globals.h"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine2 2>/dev/null
|
||||
mv ZendEngine1 Zend
|
||||
fi
|
||||
fi
|
||||
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
|
||||
v=5
|
||||
else
|
||||
v=4
|
||||
fi
|
||||
|
||||
ZENDDIR=Zend
|
||||
echo "using default Zend directory"
|
||||
if test "$v" = "5"; then
|
||||
if test -r "Zend/OBJECTS2_HOWTO"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine1 2>/dev/null
|
||||
mv ZendEngine2 Zend
|
||||
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* \
|
||||
|
||||
+76
-34
@@ -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=4
|
||||
MINOR_VERSION=3
|
||||
RELEASE_VERSION=10
|
||||
EXTRA_VERSION="RC2"
|
||||
MINOR_VERSION=4
|
||||
RELEASE_VERSION=0
|
||||
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,6 +81,10 @@ 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,13 +173,23 @@ 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
|
||||
dnl See bug #28605
|
||||
case $host_cpu in
|
||||
alpha*)
|
||||
if test "$GCC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -mieee"
|
||||
else
|
||||
CFLAGS="$CFLAGS -ieee"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
@@ -196,6 +209,26 @@ 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
|
||||
;;
|
||||
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 +311,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 +355,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 \
|
||||
@@ -402,6 +436,12 @@ PHP_TM_GMTOFF
|
||||
PHP_STRUCT_FLOCK
|
||||
PHP_SOCKLEN_T
|
||||
|
||||
AC_CHECK_SIZEOF(intmax_t, 0)
|
||||
AC_CHECK_SIZEOF(size_t, 8)
|
||||
AC_CHECK_SIZEOF(ssize_t, 8)
|
||||
AC_CHECK_SIZEOF(ptrdiff_t, 8)
|
||||
AC_CHECK_SIZEOF(long long, 8)
|
||||
AC_CHECK_SIZEOF(long long int, 8)
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
|
||||
@@ -812,7 +852,6 @@ fi
|
||||
|
||||
enable_shared=yes
|
||||
enable_static=yes
|
||||
unset with_pic
|
||||
|
||||
case $php_build_target in
|
||||
program|static)
|
||||
@@ -823,7 +862,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
|
||||
@@ -849,6 +891,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)
|
||||
@@ -858,17 +905,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
|
||||
@@ -876,7 +919,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
|
||||
|
||||
@@ -893,6 +936,8 @@ dnl
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
esac
|
||||
fi
|
||||
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
|
||||
fi
|
||||
|
||||
|
||||
@@ -906,10 +951,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_EXPERIMENTAL_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
PHP_THREAD_SAFETY=yes
|
||||
@@ -917,6 +958,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)/"
|
||||
@@ -1089,7 +1133,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)
|
||||
@@ -1118,8 +1161,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)
|
||||
@@ -1236,7 +1277,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
|
||||
@@ -1246,9 +1286,11 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
|
||||
|
||||
$php_shtool mkdir -p pear/scripts
|
||||
$php_shtool mkdir -p scripts
|
||||
$php_shtool mkdir -p scripts/man1
|
||||
|
||||
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
|
||||
scripts/phpize scripts/php-config \
|
||||
scripts/phpize scripts/man1/phpize.1 \
|
||||
scripts/php-config scripts/man1/php-config.1 \
|
||||
$PHP_OUTPUT_FILES"
|
||||
|
||||
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
|
||||
@@ -1262,12 +1304,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 <string.h>
|
||||
|
||||
+40
-46
@@ -40,9 +40,6 @@
|
||||
#define PHP_BZ_ERRSTR 1
|
||||
#define PHP_BZ_ERRBOTH 2
|
||||
|
||||
/* Blocksize of the decompression buffer */
|
||||
#define PHP_BZ_DECOMPRESS_SIZE 4096
|
||||
|
||||
function_entry bz2_functions[] = {
|
||||
PHP_FE(bzopen, NULL)
|
||||
PHP_FE(bzread, NULL)
|
||||
@@ -196,7 +193,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);
|
||||
}
|
||||
}
|
||||
@@ -434,56 +431,53 @@ PHP_FUNCTION(bzcompress)
|
||||
Decompresses BZip2 compressed data */
|
||||
PHP_FUNCTION(bzdecompress)
|
||||
{
|
||||
zval **source, /* Source data to decompress */
|
||||
**zsmall; /* (Optional) user specified small */
|
||||
char *dest; /* Destination buffer, initially allocated */
|
||||
int error, /* Error container */
|
||||
iter = 1, /* Iteration count for the compression loop */
|
||||
size, /* Current size to realloc the dest buffer to */
|
||||
dest_len = PHP_BZ_DECOMPRESS_SIZE, /* Size of the destination length */
|
||||
small = 0, /* The actual small */
|
||||
argc = ZEND_NUM_ARGS(); /* Argument count */
|
||||
|
||||
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &source, &zsmall) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
char *source, *dest;
|
||||
int source_len, error;
|
||||
long small = 0;
|
||||
#if defined(PHP_WIN32) && _MSC_VER < 1300
|
||||
unsigned __int64 size = 0;
|
||||
#else
|
||||
unsigned long long size = 0;
|
||||
#endif
|
||||
bz_stream bzs;
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &small)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_string_ex(source);
|
||||
|
||||
/* optional small argument handling */
|
||||
if (argc > 1) {
|
||||
convert_to_long_ex(zsmall);
|
||||
small = Z_LVAL_PP(zsmall);
|
||||
bzs.bzalloc = NULL;
|
||||
bzs.bzfree = NULL;
|
||||
|
||||
if (BZ2_bzDecompressInit(&bzs, 0, small) != BZ_OK) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* Depending on the size of the source buffer, either allocate
|
||||
the length of the source buffer or the a default decompression
|
||||
size */
|
||||
dest = emalloc(PHP_BZ_DECOMPRESS_SIZE > Z_STRLEN_PP(source) ? PHP_BZ_DECOMPRESS_SIZE : Z_STRLEN_PP(source));
|
||||
bzs.next_in = source;
|
||||
bzs.avail_in = source_len;
|
||||
|
||||
/* (de)Compression Loop */
|
||||
do {
|
||||
/* Handle the (re)allocation of the buffer */
|
||||
size = dest_len * iter;
|
||||
if (iter > 1) {
|
||||
dest = erealloc(dest, size);
|
||||
}
|
||||
++iter;
|
||||
|
||||
/* Perform the decompression */
|
||||
error = BZ2_bzBuffToBuffDecompress(dest, &size, Z_STRVAL_PP(source), Z_STRLEN_PP(source), small, 0);
|
||||
} while (error == BZ_OUTBUFF_FULL);
|
||||
/* in most cases bz2 offers at least 2:1 compression, so we use that as our base */
|
||||
bzs.avail_out = source_len * 2;
|
||||
bzs.next_out = dest = emalloc(bzs.avail_out + 1);
|
||||
|
||||
if (error != BZ_OK) {
|
||||
efree(dest);
|
||||
RETURN_LONG(error);
|
||||
} else {
|
||||
/* we might have allocated a little to much, so erealloc the buffer
|
||||
down to size, before returning it */
|
||||
while ((error = BZ2_bzDecompress(&bzs)) == BZ_OK && bzs.avail_in > 0) {
|
||||
/* compression is better then 2:1, need to allocate more memory */
|
||||
bzs.avail_out = source_len;
|
||||
size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
|
||||
dest = erealloc(dest, size + bzs.avail_out + 1);
|
||||
bzs.next_out = dest + size;
|
||||
}
|
||||
|
||||
if (error == BZ_STREAM_END || error == BZ_OK) {
|
||||
size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
|
||||
dest = erealloc(dest, size + 1);
|
||||
dest[size] = 0;
|
||||
RETURN_STRINGL(dest, size, 0);
|
||||
dest[size] = '\0';
|
||||
RETVAL_STRINGL(dest, size, 0);
|
||||
} else { /* real error */
|
||||
efree(dest);
|
||||
RETVAL_LONG(error);
|
||||
}
|
||||
|
||||
BZ2_bzDecompressEnd(&bzs);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+303
-301
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Shane Caraveo <shane@caraveo.com> |
|
||||
| Colin Viebrock <colin@easydns.com> |
|
||||
| Hartmut Holzgraefe <hartmut@six.de> |
|
||||
| Hartmut Holzgraefe <hholzgra@php.net> |
|
||||
| Wez Furlong <wez@thebrainroom.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "sdncal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
function_entry calendar_functions[] = {
|
||||
PHP_FE(jdtogregorian, NULL)
|
||||
PHP_FE(gregoriantojd, NULL)
|
||||
@@ -48,10 +48,10 @@ function_entry calendar_functions[] = {
|
||||
PHP_FE(jdmonthname, NULL)
|
||||
PHP_FE(easter_date, NULL)
|
||||
PHP_FE(easter_days, NULL)
|
||||
PHP_FE(unixtojd, NULL)
|
||||
PHP_FE(jdtounix, NULL)
|
||||
PHP_FE(cal_to_jd, NULL)
|
||||
PHP_FE(cal_from_jd, NULL)
|
||||
PHP_FE(unixtojd, NULL)
|
||||
PHP_FE(jdtounix, NULL)
|
||||
PHP_FE(cal_to_jd, NULL)
|
||||
PHP_FE(cal_from_jd, NULL)
|
||||
PHP_FE(cal_days_in_month, NULL)
|
||||
PHP_FE(cal_info, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
@@ -60,8 +60,8 @@ function_entry calendar_functions[] = {
|
||||
|
||||
zend_module_entry calendar_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"calendar",
|
||||
calendar_functions,
|
||||
"calendar",
|
||||
calendar_functions,
|
||||
PHP_MINIT(calendar),
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -83,60 +83,76 @@ enum cal_name_type_t {
|
||||
CAL_FRENCH,
|
||||
CAL_NUM_CALS
|
||||
};
|
||||
typedef long int (*cal_to_jd_func_t)(int month, int day, int year);
|
||||
typedef void (*cal_from_jd_func_t)(long int jd, int* year, int* month, int* day);
|
||||
typedef char* (*cal_as_string_func_t)(int year, int month, int day);
|
||||
|
||||
typedef long int (*cal_to_jd_func_t) (int month, int day, int year);
|
||||
typedef void (*cal_from_jd_func_t) (long int jd, int *year, int *month, int *day);
|
||||
typedef char *(*cal_as_string_func_t) (int year, int month, int day);
|
||||
|
||||
struct cal_entry_t {
|
||||
char *name;
|
||||
char *symbol;
|
||||
cal_to_jd_func_t to_jd;
|
||||
cal_from_jd_func_t from_jd;
|
||||
int num_months;
|
||||
int max_days_in_month;
|
||||
char **month_name_short;
|
||||
char **month_name_long;
|
||||
char *name;
|
||||
char *symbol;
|
||||
cal_to_jd_func_t to_jd;
|
||||
cal_from_jd_func_t from_jd;
|
||||
int num_months;
|
||||
int max_days_in_month;
|
||||
char **month_name_short;
|
||||
char **month_name_long;
|
||||
};
|
||||
|
||||
static struct cal_entry_t cal_conversion_table[CAL_NUM_CALS] = {
|
||||
{ "Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31, MonthNameShort, MonthNameLong },
|
||||
{ "Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31, MonthNameShort, MonthNameLong },
|
||||
{ "Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30, JewishMonthName, JewishMonthName },
|
||||
{ "French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30, FrenchMonthName, FrenchMonthName }
|
||||
{"Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31,
|
||||
MonthNameShort, MonthNameLong},
|
||||
{"Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31,
|
||||
MonthNameShort, MonthNameLong},
|
||||
{"Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30,
|
||||
JewishMonthName, JewishMonthName},
|
||||
{"French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30,
|
||||
FrenchMonthName, FrenchMonthName}
|
||||
};
|
||||
|
||||
/* For jddayofweek */
|
||||
enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG };
|
||||
enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG };
|
||||
|
||||
/* For jdmonthname */
|
||||
enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG,
|
||||
enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG,
|
||||
CAL_MONTH_JULIAN_SHORT, CAL_MONTH_JULIAN_LONG, CAL_MONTH_JEWISH,
|
||||
CAL_MONTH_FRENCH };
|
||||
CAL_MONTH_FRENCH
|
||||
};
|
||||
|
||||
/* for heb_number_to_chars */
|
||||
static char alef_bet[25] = "0àáâãäåæçèéëìîðñòôö÷øùú";
|
||||
|
||||
|
||||
#define CAL_JEWISH_ADD_ALAFIM_GERESH 0x2
|
||||
#define CAL_JEWISH_ADD_ALAFIM 0x4
|
||||
#define CAL_JEWISH_ADD_GERESHAYIM 0x8
|
||||
|
||||
PHP_MINIT_FUNCTION(calendar)
|
||||
{
|
||||
REGISTER_LONG_CONSTANT("CAL_GREGORIAN", CAL_GREGORIAN, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JULIAN", CAL_JULIAN, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JEWISH", CAL_JEWISH, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_FRENCH", CAL_FRENCH, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_NUM_CALS", CAL_NUM_CALS, CONST_CS|CONST_PERSISTENT);
|
||||
/* constants for jddayofweek */
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_DAYNO", CAL_DOW_DAYNO, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_SHORT", CAL_DOW_SHORT, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_LONG", CAL_DOW_LONG, CONST_CS|CONST_PERSISTENT);
|
||||
/* constants for jdmonthname */
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_SHORT", CAL_MONTH_GREGORIAN_SHORT, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_LONG", CAL_MONTH_GREGORIAN_LONG, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_SHORT", CAL_MONTH_JULIAN_SHORT, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_LONG", CAL_MONTH_JULIAN_LONG, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JEWISH", CAL_MONTH_JEWISH, CONST_CS|CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_FRENCH", CAL_MONTH_FRENCH, CONST_CS|CONST_PERSISTENT);
|
||||
/* constants for easter calculation */
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_DEFAULT", CAL_EASTER_DEFAULT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ROMAN", CAL_EASTER_ROMAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_GREGORIAN", CAL_EASTER_ALWAYS_GREGORIAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_JULIAN", CAL_EASTER_ALWAYS_JULIAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_GREGORIAN", CAL_GREGORIAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JULIAN", CAL_JULIAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JEWISH", CAL_JEWISH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_FRENCH", CAL_FRENCH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_NUM_CALS", CAL_NUM_CALS, CONST_CS | CONST_PERSISTENT);
|
||||
/* constants for jddayofweek */
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_DAYNO", CAL_DOW_DAYNO, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_SHORT", CAL_DOW_SHORT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_DOW_LONG", CAL_DOW_LONG, CONST_CS | CONST_PERSISTENT);
|
||||
/* constants for jdmonthname */
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_SHORT", CAL_MONTH_GREGORIAN_SHORT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_LONG", CAL_MONTH_GREGORIAN_LONG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_SHORT", CAL_MONTH_JULIAN_SHORT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_LONG", CAL_MONTH_JULIAN_LONG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_JEWISH", CAL_MONTH_JEWISH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_MONTH_FRENCH", CAL_MONTH_FRENCH, CONST_CS | CONST_PERSISTENT);
|
||||
/* constants for easter calculation */
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_DEFAULT", CAL_EASTER_DEFAULT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ROMAN", CAL_EASTER_ROMAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_GREGORIAN", CAL_EASTER_ALWAYS_GREGORIAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_JULIAN", CAL_EASTER_ALWAYS_JULIAN, CONST_CS | CONST_PERSISTENT);
|
||||
/* constants for Jewish date formatting */
|
||||
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM_GERESH", CAL_JEWISH_ADD_ALAFIM_GERESH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM", CAL_JEWISH_ADD_ALAFIM, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_GERESHAYIM", CAL_JEWISH_ADD_GERESHAYIM, CONST_CS | CONST_PERSISTENT);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -147,42 +163,65 @@ PHP_MINFO_FUNCTION(calendar)
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* {{{ proto array cal_info(int calendar)
|
||||
Returns information about a particular calendar */
|
||||
PHP_FUNCTION(cal_info)
|
||||
static void _php_cal_info(int cal, zval **ret)
|
||||
{
|
||||
zval ** cal;
|
||||
zval * months, *smonths;
|
||||
zval *months, *smonths;
|
||||
int i;
|
||||
struct cal_entry_t * calendar;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &cal) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long_ex(cal);
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
struct cal_entry_t *calendar;
|
||||
|
||||
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
|
||||
array_init(return_value);
|
||||
calendar = &cal_conversion_table[cal];
|
||||
array_init(*ret);
|
||||
|
||||
MAKE_STD_ZVAL(months);
|
||||
MAKE_STD_ZVAL(smonths);
|
||||
array_init(months);
|
||||
array_init(smonths);
|
||||
|
||||
for (i=1; i<= calendar->num_months; i++) {
|
||||
|
||||
for (i = 1; i <= calendar->num_months; i++) {
|
||||
add_index_string(months, i, calendar->month_name_long[i], 1);
|
||||
add_index_string(smonths, i, calendar->month_name_short[i], 1);
|
||||
}
|
||||
add_assoc_zval(return_value, "months", months);
|
||||
add_assoc_zval(return_value, "abbrevmonths", smonths);
|
||||
add_assoc_long(return_value, "maxdaysinmonth", calendar->max_days_in_month);
|
||||
add_assoc_string(return_value, "calname", calendar->name, 1);
|
||||
add_assoc_string(return_value, "calsymbol", calendar->symbol, 1);
|
||||
add_assoc_zval(*ret, "months", months);
|
||||
add_assoc_zval(*ret, "abbrevmonths", smonths);
|
||||
add_assoc_long(*ret, "maxdaysinmonth", calendar->max_days_in_month);
|
||||
add_assoc_string(*ret, "calname", calendar->name, 1);
|
||||
add_assoc_string(*ret, "calsymbol", calendar->symbol, 1);
|
||||
|
||||
}
|
||||
|
||||
/* {{{ proto array cal_info(int calendar)
|
||||
Returns information about a particular calendar */
|
||||
PHP_FUNCTION(cal_info)
|
||||
{
|
||||
long cal = -1;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &cal) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (cal == -1) {
|
||||
int i;
|
||||
zval *val;
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
for (i = 0; i < CAL_NUM_CALS; i++) {
|
||||
MAKE_STD_ZVAL(val);
|
||||
_php_cal_info(i, &val);
|
||||
add_index_zval(return_value, i, val);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
_php_cal_info(cal, &return_value);
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -190,34 +229,35 @@ PHP_FUNCTION(cal_info)
|
||||
Returns the number of days in a month for a given year and calendar */
|
||||
PHP_FUNCTION(cal_days_in_month)
|
||||
{
|
||||
zval ** cal, **month, **year;
|
||||
struct cal_entry_t * calendar;
|
||||
long cal, month, year;
|
||||
struct cal_entry_t *calendar;
|
||||
long sdn_start, sdn_next;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &cal, &month, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long_ex(cal);
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &cal, &month, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
|
||||
|
||||
sdn_start = calendar->to_jd(Z_LVAL_PP(year), Z_LVAL_PP(month), 1);
|
||||
|
||||
sdn_next = calendar->to_jd(Z_LVAL_PP(year), 1 + Z_LVAL_PP(month), 1);
|
||||
|
||||
if (sdn_next == 0) {
|
||||
/* if invalid, try first month of the next year... */
|
||||
sdn_next = calendar->to_jd(Z_LVAL_PP(year) + 1, 1, 1);
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
calendar = &cal_conversion_table[cal];
|
||||
|
||||
sdn_start = calendar->to_jd(year, month, 1);
|
||||
|
||||
if (sdn_start == 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid date.");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
sdn_next = calendar->to_jd(year, 1 + month, 1);
|
||||
|
||||
if (sdn_next == 0) {
|
||||
/* if invalid, try first month of the next year... */
|
||||
sdn_next = calendar->to_jd(year + 1, 1, 1);
|
||||
}
|
||||
|
||||
RETURN_LONG(sdn_next - sdn_start);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -226,26 +266,18 @@ PHP_FUNCTION(cal_days_in_month)
|
||||
Converts from a supported calendar to Julian Day Count */
|
||||
PHP_FUNCTION(cal_to_jd)
|
||||
{
|
||||
zval ** cal, **month, **day, **year;
|
||||
long jdate;
|
||||
long cal, month, day, year;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &cal, &month, &day, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long_ex(cal);
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(day);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &cal, &month, &day, &year) != SUCCESS) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
jdate = cal_conversion_table[Z_LVAL_PP(cal)].to_jd(
|
||||
Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
|
||||
RETURN_LONG(jdate);
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
RETURN_LONG(cal_conversion_table[cal].to_jd(year, month, day));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -253,42 +285,38 @@ PHP_FUNCTION(cal_to_jd)
|
||||
Converts from Julian Day Count to a supported calendar and return extended information */
|
||||
PHP_FUNCTION(cal_from_jd)
|
||||
{
|
||||
zval ** jd, ** cal;
|
||||
long jd, cal;
|
||||
int month, day, year, dow;
|
||||
char date[16];
|
||||
struct cal_entry_t * calendar;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &jd, &cal) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long_ex(jd);
|
||||
convert_to_long_ex(cal);
|
||||
struct cal_entry_t *calendar;
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS()TSRMLS_CC, "ll", &jd, &cal) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
|
||||
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
calendar = &cal_conversion_table[cal];
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
calendar->from_jd(
|
||||
Z_LVAL_PP(jd),
|
||||
&year, &month, &day);
|
||||
calendar->from_jd(jd, &year, &month, &day);
|
||||
|
||||
sprintf(date, "%i/%i/%i", month, day, year);
|
||||
add_assoc_string(return_value, "date", date, 1);
|
||||
|
||||
|
||||
add_assoc_long(return_value, "month", month);
|
||||
add_assoc_long(return_value, "day", day);
|
||||
add_assoc_long(return_value, "year", year);
|
||||
|
||||
/* day of week */
|
||||
dow = DayOfWeek(Z_LVAL_PP(jd));
|
||||
/* day of week */
|
||||
dow = DayOfWeek(jd);
|
||||
add_assoc_long(return_value, "dow", dow);
|
||||
add_assoc_string(return_value, "abbrevdayname", DayNameShort[dow], 1);
|
||||
add_assoc_string(return_value, "dayname", DayNameLong[dow], 1);
|
||||
/* month name */
|
||||
/* month name */
|
||||
add_assoc_string(return_value, "abbrevmonth", calendar->month_name_short[month], 1);
|
||||
add_assoc_string(return_value, "monthname", calendar->month_name_long[month], 1);
|
||||
}
|
||||
@@ -298,16 +326,15 @@ PHP_FUNCTION(cal_from_jd)
|
||||
Converts a julian day count to a gregorian calendar date */
|
||||
PHP_FUNCTION(jdtogregorian)
|
||||
{
|
||||
pval **julday;
|
||||
long julday;
|
||||
int year, month, day;
|
||||
char date[10];
|
||||
char date[16];
|
||||
|
||||
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(julday);
|
||||
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
SdnToGregorian(julday, &year, &month, &day);
|
||||
sprintf(date, "%i/%i/%i", month, day, year);
|
||||
|
||||
RETURN_STRING(date, 1);
|
||||
@@ -318,37 +345,29 @@ PHP_FUNCTION(jdtogregorian)
|
||||
Converts a gregorian calendar date to julian day count */
|
||||
PHP_FUNCTION(gregoriantojd)
|
||||
{
|
||||
pval **year, **month, **day;
|
||||
int jdate;
|
||||
long year, month, day;
|
||||
|
||||
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(day);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
jdate = GregorianToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
|
||||
|
||||
RETURN_LONG(jdate);
|
||||
RETURN_LONG(GregorianToSdn(year, month, day));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string jdtojulian(int juliandaycount)
|
||||
Convert a julian day count to a julian calendar date */
|
||||
PHP_FUNCTION(jdtojulian)
|
||||
PHP_FUNCTION(jdtojulian)
|
||||
{
|
||||
pval **julday;
|
||||
long julday;
|
||||
int year, month, day;
|
||||
char date[10];
|
||||
char date[16];
|
||||
|
||||
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(julday);
|
||||
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
SdnToJulian(julday, &year, &month, &day);
|
||||
sprintf(date, "%i/%i/%i", month, day, year);
|
||||
|
||||
RETURN_STRING(date, 1);
|
||||
@@ -359,137 +378,146 @@ PHP_FUNCTION(jdtojulian)
|
||||
Converts a julian calendar date to julian day count */
|
||||
PHP_FUNCTION(juliantojd)
|
||||
{
|
||||
pval **year, **month, **day;
|
||||
int jdate;
|
||||
long year, month, day;
|
||||
|
||||
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(day);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
jdate = JulianToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
|
||||
|
||||
RETURN_LONG(jdate);
|
||||
RETURN_LONG(JulianToSdn(year, month, day));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
caution: the hebrew format product non unique result.
|
||||
for example both: year '5' and year '5000' product 'ä'.
|
||||
use the numeric one for calculations.
|
||||
/* {{{ heb_number_to_chars*/
|
||||
/*
|
||||
caution: the Hebrew format produces non unique result.
|
||||
for example both: year '5' and year '5000' produce 'ä'.
|
||||
use the numeric one for calculations.
|
||||
*/
|
||||
static char* heb_number_to_chars(int n, char **ret)
|
||||
static char *heb_number_to_chars(int n, int fl, char **ret)
|
||||
{
|
||||
char *p, *old;
|
||||
char *p, old[18], *endofalafim;
|
||||
|
||||
p = emalloc(10);
|
||||
old = p;
|
||||
|
||||
/*
|
||||
prevents the option breaking the jewish beliefs, and some other
|
||||
critical resources ;)
|
||||
*/
|
||||
p = endofalafim = old;
|
||||
/*
|
||||
prevents the option breaking the jewish beliefs, and some other
|
||||
critical resources ;)
|
||||
*/
|
||||
if (n > 9999 || n < 1) {
|
||||
efree(old);
|
||||
*ret = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* alafim case */
|
||||
/* alafim (thousands) case */
|
||||
if (n / 1000) {
|
||||
*p = alef_bet[n / 1000];
|
||||
p++;
|
||||
|
||||
if (CAL_JEWISH_ADD_ALAFIM_GERESH & fl) {
|
||||
*p = '\'';
|
||||
p++;
|
||||
}
|
||||
if (CAL_JEWISH_ADD_ALAFIM & fl) {
|
||||
strcpy(p, " àìôéí ");
|
||||
p += 7;
|
||||
}
|
||||
|
||||
endofalafim = p;
|
||||
n = n % 1000;
|
||||
}
|
||||
|
||||
/* taf-taf case */
|
||||
/* tav-tav (tav=400) case */
|
||||
while (n >= 400) {
|
||||
*p = alef_bet[22];
|
||||
p++;
|
||||
n-=400;
|
||||
n -= 400;
|
||||
}
|
||||
|
||||
/* meot case */
|
||||
if (n >= 100) {
|
||||
*p = alef_bet[18+n/100];
|
||||
/* meot (hundreads) case */
|
||||
if (n >= 100) {
|
||||
*p = alef_bet[18 + n / 100];
|
||||
p++;
|
||||
n = n % 100;
|
||||
}
|
||||
|
||||
/* tet-vav tet-zain case */
|
||||
/* tet-vav & tet-zain case (special case for 15 and 16) */
|
||||
if (n == 15 || n == 16) {
|
||||
*p = alef_bet[9];
|
||||
p++;
|
||||
*p = alef_bet[n-9];
|
||||
*p = alef_bet[n - 9];
|
||||
p++;
|
||||
} else {
|
||||
/* asarot case */
|
||||
if (n >= 10) {
|
||||
*p = alef_bet[9+n/10];
|
||||
/* asarot (tens) case */
|
||||
if (n >= 10) {
|
||||
*p = alef_bet[9 + n / 10];
|
||||
p++;
|
||||
n = n % 10;
|
||||
}
|
||||
|
||||
/* yeihot case */
|
||||
/* yehidot (ones) case */
|
||||
if (n > 0) {
|
||||
*p = alef_bet[n];
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
if (CAL_JEWISH_ADD_GERESHAYIM & fl) {
|
||||
switch (p - endofalafim) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
*p = '\'';
|
||||
p++;
|
||||
break;
|
||||
default:
|
||||
*(p) = *(p - 1);
|
||||
*(p - 1) = '"';
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
*p = '\0';
|
||||
*ret = estrndup(old, (p - old) + 1);
|
||||
p = *ret;
|
||||
efree(old);
|
||||
return p;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string jdtojewish(int juliandaycount)
|
||||
/* {{{ proto string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])
|
||||
Converts a julian day count to a jewish calendar date */
|
||||
PHP_FUNCTION(jdtojewish)
|
||||
PHP_FUNCTION(jdtojewish)
|
||||
{
|
||||
long julday, fl;
|
||||
long julday, fl = 0;
|
||||
zend_bool heb = 0;
|
||||
int year, month, day;
|
||||
char date[10], hebdate[25];
|
||||
char date[16], hebdate[25];
|
||||
char *dayp, *yearp;
|
||||
|
||||
if (ZEND_NUM_ARGS() == 1) {
|
||||
if (zend_parse_parameters(1 TSRMLS_CC,"l", &julday) != SUCCESS) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
fl=0;
|
||||
} else if (ZEND_NUM_ARGS() == 2) {
|
||||
if (zend_parse_parameters(2 TSRMLS_CC,"ll", &julday, &fl) != SUCCESS) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|bl", &julday, &heb, &fl) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SdnToJewish(julday, &year, &month, &day);
|
||||
if(!fl) {
|
||||
if (!heb) {
|
||||
sprintf(date, "%i/%i/%i", month, day, year);
|
||||
RETURN_STRING(date, 1);
|
||||
} else {
|
||||
if (year <= 0 || year > 9999) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Out of range year.");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Year out of range (0-9999).");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
sprintf(hebdate, "%s %s %s", heb_number_to_chars(day, &dayp), JewishMonthHebName[month], heb_number_to_chars(year, &yearp));
|
||||
|
||||
|
||||
sprintf(hebdate, "%s %s %s", heb_number_to_chars(day, fl, &dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, &yearp));
|
||||
|
||||
if (dayp) {
|
||||
efree(dayp);
|
||||
}
|
||||
if (yearp) {
|
||||
efree(yearp);
|
||||
efree(yearp);
|
||||
}
|
||||
|
||||
RETURN_STRING(hebdate, 1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -498,20 +526,13 @@ PHP_FUNCTION(jdtojewish)
|
||||
Converts a jewish calendar date to a julian day count */
|
||||
PHP_FUNCTION(jewishtojd)
|
||||
{
|
||||
pval **year, **month, **day;
|
||||
int jdate;
|
||||
long year, month, day;
|
||||
|
||||
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(day);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
jdate = JewishToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
|
||||
|
||||
RETURN_LONG(jdate);
|
||||
RETURN_LONG(JewishToSdn(year, month, day));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -519,17 +540,15 @@ PHP_FUNCTION(jewishtojd)
|
||||
Converts a julian day count to a french republic calendar date */
|
||||
PHP_FUNCTION(jdtofrench)
|
||||
{
|
||||
pval **julday;
|
||||
long julday;
|
||||
int year, month, day;
|
||||
char date[10];
|
||||
char date[16];
|
||||
|
||||
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(julday);
|
||||
|
||||
SdnToFrench(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
SdnToFrench(julday, &year, &month, &day);
|
||||
sprintf(date, "%i/%i/%i", month, day, year);
|
||||
|
||||
RETURN_STRING(date, 1);
|
||||
@@ -540,20 +559,13 @@ PHP_FUNCTION(jdtofrench)
|
||||
Converts a french republic calendar date to julian day count */
|
||||
PHP_FUNCTION(frenchtojd)
|
||||
{
|
||||
pval **year, **month, **day;
|
||||
int jdate;
|
||||
long year, month, day;
|
||||
|
||||
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(month);
|
||||
convert_to_long_ex(day);
|
||||
convert_to_long_ex(year);
|
||||
|
||||
jdate = FrenchToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
|
||||
|
||||
RETURN_LONG(jdate);
|
||||
RETURN_LONG(FrenchToSdn(year, month, day));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -561,37 +573,30 @@ PHP_FUNCTION(frenchtojd)
|
||||
Returns name or number of day of week from julian day count */
|
||||
PHP_FUNCTION(jddayofweek)
|
||||
{
|
||||
pval *julday, *mode;
|
||||
long julday, mode = CAL_DOW_DAYNO;
|
||||
int day;
|
||||
char *daynamel, *daynames;
|
||||
int myargc=ZEND_NUM_ARGS(), mymode=0;
|
||||
|
||||
if ((myargc < 1) || (myargc > 2) || (zend_get_parameters(ht, myargc, &julday, &mode) != SUCCESS)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long(julday);
|
||||
if(myargc==2) {
|
||||
convert_to_long(mode);
|
||||
mymode = Z_LVAL_P(mode);
|
||||
}
|
||||
|
||||
day = DayOfWeek(Z_LVAL_P(julday));
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &julday, &mode) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
day = DayOfWeek(julday);
|
||||
daynamel = DayNameLong[day];
|
||||
daynames = DayNameShort[day];
|
||||
|
||||
switch (mymode) {
|
||||
case CAL_DOW_SHORT:
|
||||
RETURN_STRING(daynamel, 1);
|
||||
break;
|
||||
case CAL_DOW_LONG:
|
||||
RETURN_STRING(daynames, 1);
|
||||
break;
|
||||
case CAL_DOW_DAYNO:
|
||||
default:
|
||||
RETURN_LONG(day);
|
||||
break;
|
||||
}
|
||||
switch (mode) {
|
||||
case CAL_DOW_SHORT:
|
||||
RETURN_STRING(daynamel, 1);
|
||||
break;
|
||||
case CAL_DOW_LONG:
|
||||
RETURN_STRING(daynames, 1);
|
||||
break;
|
||||
case CAL_DOW_DAYNO:
|
||||
default:
|
||||
RETURN_LONG(day);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -599,43 +604,40 @@ PHP_FUNCTION(jddayofweek)
|
||||
Returns name of month for julian day count */
|
||||
PHP_FUNCTION(jdmonthname)
|
||||
{
|
||||
pval **julday, **mode;
|
||||
long julday, mode;
|
||||
char *monthname = NULL;
|
||||
int month, day, year;
|
||||
|
||||
if (zend_get_parameters_ex(2, &julday, &mode) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &julday, &mode) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_long_ex(julday);
|
||||
convert_to_long_ex(mode);
|
||||
|
||||
switch(Z_LVAL_PP(mode)) {
|
||||
case CAL_MONTH_GREGORIAN_LONG: /* gregorian or julian month */
|
||||
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = MonthNameLong[month];
|
||||
break;
|
||||
case CAL_MONTH_JULIAN_SHORT: /* gregorian or julian month */
|
||||
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = MonthNameShort[month];
|
||||
break;
|
||||
case CAL_MONTH_JULIAN_LONG: /* gregorian or julian month */
|
||||
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = MonthNameLong[month];
|
||||
break;
|
||||
case CAL_MONTH_JEWISH: /* jewish month */
|
||||
SdnToJewish(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = JewishMonthName[month];
|
||||
break;
|
||||
case CAL_MONTH_FRENCH: /* french month */
|
||||
SdnToFrench(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = FrenchMonthName[month];
|
||||
break;
|
||||
default: /* default gregorian */
|
||||
case CAL_MONTH_GREGORIAN_SHORT: /* gregorian or julian month */
|
||||
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
|
||||
monthname = MonthNameShort[month];
|
||||
break;
|
||||
switch (mode) {
|
||||
case CAL_MONTH_GREGORIAN_LONG: /* gregorian or julian month */
|
||||
SdnToGregorian(julday, &year, &month, &day);
|
||||
monthname = MonthNameLong[month];
|
||||
break;
|
||||
case CAL_MONTH_JULIAN_SHORT: /* gregorian or julian month */
|
||||
SdnToJulian(julday, &year, &month, &day);
|
||||
monthname = MonthNameShort[month];
|
||||
break;
|
||||
case CAL_MONTH_JULIAN_LONG: /* gregorian or julian month */
|
||||
SdnToJulian(julday, &year, &month, &day);
|
||||
monthname = MonthNameLong[month];
|
||||
break;
|
||||
case CAL_MONTH_JEWISH: /* jewish month */
|
||||
SdnToJewish(julday, &year, &month, &day);
|
||||
monthname = JewishMonthName[month];
|
||||
break;
|
||||
case CAL_MONTH_FRENCH: /* french month */
|
||||
SdnToFrench(julday, &year, &month, &day);
|
||||
monthname = FrenchMonthName[month];
|
||||
break;
|
||||
default: /* default gregorian */
|
||||
case CAL_MONTH_GREGORIAN_SHORT: /* gregorian or julian month */
|
||||
SdnToGregorian(julday, &year, &month, &day);
|
||||
monthname = MonthNameShort[month];
|
||||
break;
|
||||
}
|
||||
|
||||
RETURN_STRING(monthname, 1);
|
||||
|
||||
+8
-6
@@ -1972,15 +1972,17 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
|
||||
int type;
|
||||
|
||||
if (zend_llist_count(property_reference->elements_list)==1
|
||||
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
|
||||
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
|
||||
zval *tmp;
|
||||
|
||||
/* constructor */
|
||||
PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
/* free instance created by 'new' */
|
||||
zval_dtor(object);
|
||||
|
||||
/* and override it with the instance created by 'com_load()' */
|
||||
*object = *return_value;
|
||||
INIT_ZVAL(*return_value);
|
||||
zend_hash_index_find(Z_OBJPROP_P(return_value), 0, (void**)&handle);
|
||||
zend_list_addref(Z_RESVAL_PP(handle));
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, Z_RESVAL_PP(handle));
|
||||
zend_hash_index_update(Z_OBJPROP_P(object), 0, &tmp, sizeof(tmp), NULL);
|
||||
|
||||
zval_dtor(&function_name->element);
|
||||
return;
|
||||
|
||||
+30
-33
@@ -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
|
||||
@@ -10,7 +10,6 @@ AC_DEFUN(CPDF_JPEG_TEST,[
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_JPEG_DIR"; then
|
||||
AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libjpeg.(a|so) not found.])
|
||||
fi
|
||||
PHP_CHECK_LIBRARY(jpeg, jpeg_read_header, [
|
||||
@@ -23,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
|
||||
@@ -33,7 +32,6 @@ AC_DEFUN(CPDF_TIFF_TEST,[
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_TIFF_DIR"; then
|
||||
AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libtiff.(a|so) not found.])
|
||||
fi
|
||||
PHP_CHECK_LIBRARY(tiff, TIFFOpen, [
|
||||
@@ -46,42 +44,41 @@ AC_DEFUN(CPDF_TIFF_TEST,[
|
||||
],)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for cpdflib support)
|
||||
AC_ARG_WITH(cpdflib,
|
||||
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).],
|
||||
[
|
||||
PHP_WITH_SHARED
|
||||
if test "$withval" != "no"; then
|
||||
cpdf_withval=$withval
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
|
||||
PHP_SUBST(CPDF_SHARED_LIBADD)
|
||||
CPDF_JPEG_TEST
|
||||
CPDF_TIFF_TEST
|
||||
PHP_ARG_WITH(cpdflib, for cpdflib support,
|
||||
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).])
|
||||
|
||||
for i in $cpdf_withval /usr/local /usr; do
|
||||
if test -f "$i/include/cpdflib.h"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
AC_MSG_CHECKING(for cpdflib.h)
|
||||
AC_MSG_RESULT([in $i/include])
|
||||
if test "$PHP_CPDFLIB" != "no"; then
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
|
||||
PHP_SUBST(CPDF_SHARED_LIBADD)
|
||||
CPDF_JPEG_TEST
|
||||
CPDF_TIFF_TEST
|
||||
|
||||
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])
|
||||
for i in $PHP_CPDFLIB /usr/local /usr; do
|
||||
if test -f "$i/include/cpdflib.h"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
|
||||
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
|
||||
cpdf_libname=cpdf
|
||||
], [
|
||||
PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
|
||||
cpdf_libname=cpdfm
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
break
|
||||
fi
|
||||
done
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
|
||||
if test -z "$CPDFLIB_INCLUDE"; then
|
||||
AC_MSG_CHECKING(for cpdflib.h)
|
||||
AC_MSG_ERROR([not found])
|
||||
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
|
||||
|
||||
if test -z "$CPDFLIB_INCLUDE"; then
|
||||
AC_MSG_ERROR([cpdflib.h not found])
|
||||
fi
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
fi
|
||||
@@ -9,6 +9,7 @@ if test "$PHP_CRACK" != "no"; then
|
||||
|
||||
for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do
|
||||
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i && break
|
||||
test -f $i/libcrack_krb5.$SHLIB_SUFFIX_NAME -o -f $i/libcrack_krb5.a && CRACK_LIBDIR=$i && break
|
||||
done
|
||||
|
||||
if test -z "$CRACK_LIBDIR"; then
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
|
||||
#include <packer.h>
|
||||
|
||||
#ifndef STRINGSIZE
|
||||
#define STRINGSIZE 1024
|
||||
#endif
|
||||
|
||||
extern char * FascistLook(PWDICT *pwp, char *instring);
|
||||
extern int PWClose(PWDICT *pwp);
|
||||
|
||||
@@ -230,6 +234,7 @@ ZEND_FUNCTION(crack_check)
|
||||
if (zend_get_parameters_ex(2, &dictionary, &password) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
id = Z_LVAL_PP(dictionary);
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@ if test "$PHP_CURL" != "no"; then
|
||||
CURL_CONFIG="curl-config"
|
||||
AC_MSG_CHECKING(for cURL 7.9.8 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
|
||||
|
||||
+51
-8
@@ -50,6 +50,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 int le_curl;
|
||||
@@ -64,6 +65,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[] = {
|
||||
@@ -415,10 +436,12 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
zend_list_addref(ch->id);
|
||||
ZVAL_STRINGL(argv[1], data, length, 1);
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = call_user_function(EG(function_table),
|
||||
NULL,
|
||||
t->func,
|
||||
retval, 2, argv TSRMLS_CC);
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
@@ -474,10 +497,12 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
zend_list_addref(t->fd);
|
||||
ZVAL_LONG(argv[2], (int) size * nmemb);
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = call_user_function(EG(function_table),
|
||||
NULL,
|
||||
t->func,
|
||||
retval, 3, argv TSRMLS_CC);
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
@@ -532,10 +557,12 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
||||
zend_list_addref(ch->id);
|
||||
ZVAL_STRINGL(argv[1], data, length, 1);
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = call_user_function(EG(function_table),
|
||||
NULL,
|
||||
t->func,
|
||||
retval, 2, argv TSRMLS_CC);
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
@@ -585,10 +612,12 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
ZVAL_STRING(argv[1], prompt, 1);
|
||||
ZVAL_LONG(argv[2], buflen);
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = call_user_function(EG(function_table),
|
||||
NULL,
|
||||
func,
|
||||
retval, 2, argv TSRMLS_CC);
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
} else if (Z_TYPE_P(retval) == IS_STRING) {
|
||||
@@ -659,7 +688,9 @@ static void alloc_curl_handle(php_curl **ch)
|
||||
(*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
|
||||
(*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
|
||||
memset(&(*ch)->err, 0, sizeof((*ch)->err));
|
||||
|
||||
|
||||
(*ch)->in_callback = 0;
|
||||
|
||||
zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
|
||||
(void(*)(void *)) curl_free_string, 0);
|
||||
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
|
||||
@@ -682,6 +713,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));
|
||||
}
|
||||
|
||||
alloc_curl_handle(&ch);
|
||||
|
||||
ch->cp = curl_easy_init();
|
||||
@@ -712,7 +748,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);
|
||||
@@ -724,7 +759,7 @@ PHP_FUNCTION(curl_init)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ 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)
|
||||
{
|
||||
@@ -819,8 +854,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);
|
||||
|
||||
@@ -955,16 +994,16 @@ PHP_FUNCTION(curl_setopt)
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1308,7 +1347,11 @@ PHP_FUNCTION(curl_close)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
|
||||
|
||||
|
||||
if (ch->in_callback) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback");
|
||||
return;
|
||||
}
|
||||
zend_list_delete(Z_LVAL_PP(zid));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -93,6 +93,7 @@ typedef struct {
|
||||
struct _php_curl_free to_free;
|
||||
long id;
|
||||
unsigned int uses;
|
||||
zend_bool in_callback;
|
||||
} php_curl;
|
||||
|
||||
/* streams support */
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ dnl
|
||||
|
||||
# Checks for libraries.
|
||||
# Prefer gdbm, Berkeley DB and ndbm/dbm, in that order
|
||||
AC_DEFUN(AC_PREFERRED_DB_LIB,[
|
||||
AC_DEFUN([AC_PREFERRED_DB_LIB],[
|
||||
AC_CHECK_LIB(gdbm, gdbm_open,[AC_DEFINE(GDBM,1, [Whether you have GDBM]) DBM_TYPE=gdbm; DBM_LIB=-lgdbm],
|
||||
[AC_CHECK_LIB(c, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=],
|
||||
[AC_CHECK_LIB(dbm, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=-ldbm],
|
||||
|
||||
+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"
|
||||
@@ -81,7 +81,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, [ ])
|
||||
@@ -134,7 +133,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,[
|
||||
@@ -343,7 +342,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, [ ])
|
||||
@@ -389,7 +388,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"
|
||||
@@ -407,7 +406,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"
|
||||
|
||||
+99
-104
@@ -118,28 +118,33 @@ static PHP_MSHUTDOWN_FUNCTION(dbase)
|
||||
Opens a dBase-format database file */
|
||||
PHP_FUNCTION(dbase_open)
|
||||
{
|
||||
pval *dbf_name, *options;
|
||||
zval **dbf_name, **options;
|
||||
dbhead_t *dbh;
|
||||
int handle;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbf_name, &options)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &dbf_name, &options) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string(dbf_name);
|
||||
convert_to_long(options);
|
||||
convert_to_string_ex(dbf_name);
|
||||
convert_to_long_ex(options);
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
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;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(Z_STRVAL_P(dbf_name) TSRMLS_CC)) {
|
||||
if (php_check_open_basedir(Z_STRVAL_PP(dbf_name) TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
dbh = dbf_open(Z_STRVAL_P(dbf_name), Z_LVAL_P(options) TSRMLS_CC);
|
||||
dbh = dbf_open(Z_STRVAL_PP(dbf_name), Z_LVAL_PP(options) TSRMLS_CC);
|
||||
if (dbh == NULL) {
|
||||
php_error(E_WARNING, "unable to open database %s", Z_STRVAL_P(dbf_name));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to open database %s", Z_STRVAL_PP(dbf_name));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -152,22 +157,22 @@ PHP_FUNCTION(dbase_open)
|
||||
Closes an open dBase-format database file */
|
||||
PHP_FUNCTION(dbase_close)
|
||||
{
|
||||
pval *dbh_id;
|
||||
zval **dbh_id;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &dbh_id) == FAILURE)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
convert_to_long_ex(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
zend_list_delete(Z_LVAL_P(dbh_id));
|
||||
zend_list_delete(Z_LVAL_PP(dbh_id));
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -176,18 +181,18 @@ PHP_FUNCTION(dbase_close)
|
||||
Returns the number of records in the database */
|
||||
PHP_FUNCTION(dbase_numrecords)
|
||||
{
|
||||
pval *dbh_id;
|
||||
zval **dbh_id;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &dbh_id) == FAILURE)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
convert_to_long_ex(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -199,18 +204,18 @@ PHP_FUNCTION(dbase_numrecords)
|
||||
Returns the number of fields (columns) in the database */
|
||||
PHP_FUNCTION(dbase_numfields)
|
||||
{
|
||||
pval *dbh_id;
|
||||
zval **dbh_id;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &dbh_id) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
convert_to_long_ex(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -222,18 +227,18 @@ PHP_FUNCTION(dbase_numfields)
|
||||
Packs the database (deletes records marked for deletion) */
|
||||
PHP_FUNCTION(dbase_pack)
|
||||
{
|
||||
pval *dbh_id;
|
||||
zval **dbh_id;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &dbh_id) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
convert_to_long_ex(dbh_id);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -247,7 +252,7 @@ PHP_FUNCTION(dbase_pack)
|
||||
Adds a record to the database */
|
||||
PHP_FUNCTION(dbase_add_record)
|
||||
{
|
||||
pval *dbh_id, *fields, **field;
|
||||
zval **dbh_id, **fields, **field;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
|
||||
@@ -257,40 +262,36 @@ PHP_FUNCTION(dbase_add_record)
|
||||
int i;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &fields)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &dbh_id, &fields) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
if (Z_TYPE_P(fields) != IS_ARRAY) {
|
||||
php_error(E_WARNING, "Expected array as second parameter");
|
||||
convert_to_long_ex(dbh_id);
|
||||
if (Z_TYPE_PP(fields) != IS_ARRAY) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
|
||||
|
||||
if (num_fields != dbh->db_nfields) {
|
||||
php_error(E_WARNING, "Wrong number of fields specified");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong number of fields specified");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
cp = t_cp = (char *)emalloc(dbh->db_rlen + 1);
|
||||
if (!cp) {
|
||||
php_error(E_WARNING, "unable to allocate memory");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
*t_cp++ = VALID_RECORD;
|
||||
|
||||
dbf = dbh->db_fields;
|
||||
for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
|
||||
zval tmp;
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error(E_WARNING, "unexpected error");
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unexpected error");
|
||||
efree(cp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -305,7 +306,7 @@ PHP_FUNCTION(dbase_add_record)
|
||||
|
||||
dbh->db_records++;
|
||||
if (put_dbf_record(dbh, dbh->db_records, cp) < 0) {
|
||||
php_error(E_WARNING, "unable to put record at %ld", dbh->db_records);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to put record at %ld", dbh->db_records);
|
||||
efree(cp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -321,7 +322,7 @@ PHP_FUNCTION(dbase_add_record)
|
||||
Replaces a record to the database */
|
||||
PHP_FUNCTION(dbase_replace_record)
|
||||
{
|
||||
pval *dbh_id, *fields, **field, *recnum;
|
||||
zval **dbh_id, **fields, **field, **recnum;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
|
||||
@@ -331,40 +332,36 @@ PHP_FUNCTION(dbase_replace_record)
|
||||
int i;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &dbh_id, &fields, &recnum)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &dbh_id, &fields, &recnum) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
convert_to_long(recnum);
|
||||
if (Z_TYPE_P(fields) != IS_ARRAY) {
|
||||
php_error(E_WARNING, "Expected array as second parameter");
|
||||
convert_to_long_ex(dbh_id);
|
||||
convert_to_long_ex(recnum);
|
||||
if (Z_TYPE_PP(fields) != IS_ARRAY) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
|
||||
|
||||
if (num_fields != dbh->db_nfields) {
|
||||
php_error(E_WARNING, "Wrong number of fields specified");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong number of fields specified");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
cp = t_cp = (char *)emalloc(dbh->db_rlen + 1);
|
||||
if (!cp) {
|
||||
php_error(E_WARNING, "unable to allocate memory");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
*t_cp++ = VALID_RECORD;
|
||||
|
||||
dbf = dbh->db_fields;
|
||||
for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error(E_WARNING, "unexpected error");
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unexpected error");
|
||||
efree(cp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -373,8 +370,8 @@ PHP_FUNCTION(dbase_replace_record)
|
||||
t_cp += cur_f->db_flen;
|
||||
}
|
||||
|
||||
if (put_dbf_record(dbh, Z_LVAL_P(recnum), cp) < 0) {
|
||||
php_error(E_WARNING, "unable to put record at %ld", dbh->db_records);
|
||||
if (put_dbf_record(dbh, Z_LVAL_PP(recnum), cp) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to put record at %ld", dbh->db_records);
|
||||
efree(cp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -390,28 +387,28 @@ PHP_FUNCTION(dbase_replace_record)
|
||||
Marks a record to be deleted */
|
||||
PHP_FUNCTION(dbase_delete_record)
|
||||
{
|
||||
pval *dbh_id, *record;
|
||||
zval **dbh_id, **record;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &dbh_id, &record) == FAILURE)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
convert_to_long(record);
|
||||
convert_to_long_ex(dbh_id);
|
||||
convert_to_long_ex(record);
|
||||
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (del_dbf_record(dbh, Z_LVAL_P(record)) < 0) {
|
||||
if (Z_LVAL_P(record) > dbh->db_records) {
|
||||
php_error(E_WARNING, "record %d out of bounds", Z_LVAL_P(record));
|
||||
if (del_dbf_record(dbh, Z_LVAL_PP(record)) < 0) {
|
||||
if (Z_LVAL_PP(record) > dbh->db_records) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "record %ld out of bounds", Z_LVAL_PP(record));
|
||||
} else {
|
||||
php_error(E_WARNING, "unable to delete record %d", Z_LVAL_P(record));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to delete record %ld", Z_LVAL_PP(record));
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -425,7 +422,7 @@ PHP_FUNCTION(dbase_delete_record)
|
||||
*/
|
||||
static void php_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS, int assoc)
|
||||
{
|
||||
pval *dbh_id, *record;
|
||||
zval **dbh_id, **record;
|
||||
dbhead_t *dbh;
|
||||
int dbh_type;
|
||||
dbfield_t *dbf, *cur_f;
|
||||
@@ -435,28 +432,26 @@ static void php_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS, int assoc)
|
||||
int errno_save;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &dbh_id, &record) == FAILURE)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(dbh_id);
|
||||
convert_to_long(record);
|
||||
convert_to_long_ex(dbh_id);
|
||||
convert_to_long_ex(record);
|
||||
|
||||
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
|
||||
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
|
||||
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
|
||||
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if ((data = get_dbf_record(dbh, Z_LVAL_P(record))) == NULL) {
|
||||
php_error(E_WARNING, "Tried to read bad record %d", Z_LVAL_P(record));
|
||||
if ((data = get_dbf_record(dbh, Z_LVAL_PP(record))) == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to read bad record %ld", Z_LVAL_PP(record));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
dbf = dbh->db_fields;
|
||||
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
array_init(return_value);
|
||||
|
||||
fnp = NULL;
|
||||
for (cur_f = dbf; cur_f < &dbf[dbh->db_nfields]; cur_f++) {
|
||||
@@ -577,7 +572,7 @@ PHP_FUNCTION(dbase_get_record_with_names)
|
||||
Creates a new dBase-format database file */
|
||||
PHP_FUNCTION(dbase_create)
|
||||
{
|
||||
pval *filename, *fields, **field, **value;
|
||||
zval **filename, **fields, **field, **value;
|
||||
int fd;
|
||||
dbhead_t *dbh;
|
||||
|
||||
@@ -586,37 +581,37 @@ PHP_FUNCTION(dbase_create)
|
||||
int i, rlen, handle;
|
||||
DBase_TLS_VARS;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &filename, &fields)==FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &filename, &fields) == FAILURE)) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string(filename);
|
||||
convert_to_string_ex(filename);
|
||||
|
||||
if (Z_TYPE_P(fields) != IS_ARRAY) {
|
||||
php_error(E_WARNING, "Expected array as second parameter");
|
||||
if (Z_TYPE_PP(fields) != IS_ARRAY) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(filename), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(filename), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(Z_STRVAL_P(filename) TSRMLS_CC)) {
|
||||
if (php_check_open_basedir(Z_STRVAL_PP(filename) TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if ((fd = VCWD_OPEN_MODE(Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) {
|
||||
php_error(E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
|
||||
if ((fd = VCWD_OPEN_MODE(Z_STRVAL_PP(filename), O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
|
||||
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
|
||||
|
||||
/* have to use regular malloc() because this gets free()d by
|
||||
code in the dbase library */
|
||||
dbh = (dbhead_t *)malloc(sizeof(dbhead_t));
|
||||
dbf = (dbfield_t *)malloc(sizeof(dbfield_t) * num_fields);
|
||||
if (!dbh || !dbf) {
|
||||
php_error(E_WARNING, "Unable to allocate memory for header info");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate memory for header info");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -646,27 +641,27 @@ PHP_FUNCTION(dbase_create)
|
||||
|
||||
for (i = 0, cur_f = dbf; i < num_fields; i++, cur_f++) {
|
||||
/* look up the first field */
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error(E_WARNING, "unable to find field %d", i);
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to find field %d", i);
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (Z_TYPE_PP (field) != IS_ARRAY) {
|
||||
php_error(E_WARNING, "second parameter must be array of arrays");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "second parameter must be array of arrays");
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* field name */
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP(field), 0, (void **)&value) == FAILURE) {
|
||||
php_error(E_WARNING, "expected field name as first element of list in field %d", i);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field name as first element of list in field %d", i);
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(value);
|
||||
if (Z_STRLEN_PP(value) > 10 || Z_STRLEN_PP(value) == 0) {
|
||||
php_error(E_WARNING, "invalid field name '%s' (must be non-empty and less than or equal to 10 characters)", Z_STRVAL_PP(value));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid field name '%s' (must be non-empty and less than or equal to 10 characters)", Z_STRVAL_PP(value));
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -674,7 +669,7 @@ PHP_FUNCTION(dbase_create)
|
||||
|
||||
/* field type */
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP (field), 1, (void **)&value) == FAILURE) {
|
||||
php_error(E_WARNING, "expected field type as second element of list in field %d", i);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field type as second element of list in field %d", i);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(value);
|
||||
@@ -699,7 +694,7 @@ PHP_FUNCTION(dbase_create)
|
||||
case 'C':
|
||||
/* field length */
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP (field), 2, (void **)&value) == FAILURE) {
|
||||
php_error(E_WARNING, "expected field length as third element of list in field %d", i);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field length as third element of list in field %d", i);
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -708,7 +703,7 @@ PHP_FUNCTION(dbase_create)
|
||||
|
||||
if (cur_f->db_type == 'N') {
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP (field), 3, (void **)&value) == FAILURE) {
|
||||
php_error(E_WARNING, "expected field precision as fourth element of list in field %d", i);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field precision as fourth element of list in field %d", i);
|
||||
free_dbf_head(dbh);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -717,7 +712,7 @@ PHP_FUNCTION(dbase_create)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
php_error(E_WARNING, "unknown field type '%c'", cur_f->db_type);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unknown field type '%c'", cur_f->db_type);
|
||||
}
|
||||
cur_f->db_foffset = rlen;
|
||||
rlen += cur_f->db_flen;
|
||||
|
||||
+10
-9
@@ -136,7 +136,8 @@ void pack_dbf(dbhead_t *dbh)
|
||||
|
||||
/* Try to truncate the file to the right size. */
|
||||
if (ftruncate(dbh->db_fd, out_off) != 0) {
|
||||
php_error(E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there.");
|
||||
TSRMLS_FETCH();
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there.");
|
||||
}
|
||||
|
||||
if (rec_cnt == 0)
|
||||
@@ -167,16 +168,16 @@ void put_field_val(char *rp, dbfield_t *fldp, char *cp)
|
||||
*/
|
||||
void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp)
|
||||
{
|
||||
dbfield_t *cur_f;
|
||||
int nfields = dbh->db_nfields;
|
||||
char *fnp = (char *)malloc(dbh->db_rlen);
|
||||
dbfield_t *cur_f;
|
||||
int nfields = dbh->db_nfields;
|
||||
char *fnp = (char *)malloc(dbh->db_rlen);
|
||||
|
||||
printf("%c", *cp);
|
||||
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
|
||||
printf(" ");
|
||||
printf("%c", *cp);
|
||||
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
|
||||
printf(" ");
|
||||
printf(cur_f->db_format, get_field_val(cp, cur_f, fnp));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
free(fnp);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -596,6 +596,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;
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
AC_DEFUN(PHP_DOM_CHECK_VERSION,[
|
||||
AC_DEFUN([PHP_DOM_CHECK_VERSION],[
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD
|
||||
AC_MSG_CHECKING(for libxml version)
|
||||
@@ -78,7 +78,7 @@ if test "$PHP_DOM" != "no"; then
|
||||
PHP_SUBST(DOMXML_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
AC_DEFUN(PHP_DOM_XSLT_CHECK_VERSION,[
|
||||
AC_DEFUN([PHP_DOM_XSLT_CHECK_VERSION],[
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$DOMXSLT_DIR/include
|
||||
AC_MSG_CHECKING(for libxslt version)
|
||||
@@ -95,7 +95,7 @@ AC_DEFUN(PHP_DOM_XSLT_CHECK_VERSION,[
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_DOM_EXSLT_CHECK_VERSION,[
|
||||
AC_DEFUN([PHP_DOM_EXSLT_CHECK_VERSION],[
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$DOMEXSLT_DIR/include
|
||||
AC_MSG_CHECKING(for libexslt version)
|
||||
|
||||
@@ -2471,6 +2471,10 @@ PHP_FUNCTION(domxml_node_append_child)
|
||||
}
|
||||
/* end libxml2 code */
|
||||
else if (child->type == XML_ATTRIBUTE_NODE) {
|
||||
if (parent->type != XML_ELEMENT_NODE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Element node required to append Attribute");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (parent->properties != NULL) {
|
||||
/* Check if an attribute with the same name exists */
|
||||
xmlAttrPtr foundattrp;
|
||||
@@ -2608,10 +2612,7 @@ PHP_FUNCTION(domxml_node_insert_before)
|
||||
if (new_child == NULL)
|
||||
new_child = xmlAddPrevSibling(refp, child);
|
||||
} else {
|
||||
/* first unlink node, if child is already a child of parent
|
||||
for some strange reason, this is needed
|
||||
*/
|
||||
if (child->parent == parent){
|
||||
if (child->parent != NULL){
|
||||
xmlUnlinkNode(child);
|
||||
}
|
||||
new_child = xmlAddChild(parent, child);
|
||||
|
||||
+29
-12
@@ -33,6 +33,8 @@ typedef struct {
|
||||
int cflags;
|
||||
} reg_cache;
|
||||
|
||||
static int reg_magic = 0;
|
||||
|
||||
/* {{{ _php_regcomp
|
||||
*/
|
||||
static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
@@ -42,19 +44,34 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
reg_cache *rc = NULL;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if(zend_hash_find(®(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == FAILURE ||
|
||||
rc->cflags != cflags) {
|
||||
r = regcomp(preg, pattern, cflags);
|
||||
if(!r) {
|
||||
reg_cache rcp;
|
||||
|
||||
rcp.cflags = cflags;
|
||||
memcpy(&rcp.preg, preg, sizeof(*preg));
|
||||
zend_hash_update(®(ht_rc), (char *) pattern, patlen+1,
|
||||
(void *) &rcp, sizeof(rcp), NULL);
|
||||
if(zend_hash_find(®(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == SUCCESS
|
||||
&& rc->cflags == cflags) {
|
||||
/*
|
||||
* We use a saved magic number to see whether cache is corrupted, and if it
|
||||
* is, we flush it and compile the pattern from scratch.
|
||||
*/
|
||||
if (rc->preg.re_magic != reg_magic) {
|
||||
zend_hash_clean(®(ht_rc));
|
||||
} else {
|
||||
memcpy(preg, &rc->preg, sizeof(*preg));
|
||||
return r;
|
||||
}
|
||||
} else {
|
||||
memcpy(preg, &rc->preg, sizeof(*preg));
|
||||
}
|
||||
|
||||
r = regcomp(preg, pattern, cflags);
|
||||
if(!r) {
|
||||
reg_cache rcp;
|
||||
|
||||
rcp.cflags = cflags;
|
||||
memcpy(&rcp.preg, preg, sizeof(*preg));
|
||||
/*
|
||||
* Since we don't have access to the actual MAGIC1 definition in the private
|
||||
* header file, we save the magic value immediately after compilation. Hopefully,
|
||||
* it's good.
|
||||
*/
|
||||
if (!reg_magic) reg_magic = preg->re_magic;
|
||||
zend_hash_update(®(ht_rc), (char *) pattern, patlen+1,
|
||||
(void *) &rcp, sizeof(rcp), NULL);
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
+25
-2
@@ -58,7 +58,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
|
||||
@@ -68,6 +68,12 @@
|
||||
#include "ext/mbstring/mbstring.h"
|
||||
#endif
|
||||
|
||||
/* needed for ssize_t definition */
|
||||
#include <sys/types.h>
|
||||
#if defined(PHP_WIN32) && !defined(ssize_t)
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
#ifndef safe_emalloc
|
||||
@@ -85,6 +91,8 @@ typedef unsigned char uchar;
|
||||
|
||||
#define EFREE_IF(ptr) if (ptr) efree(ptr)
|
||||
|
||||
#define MAX_IFD_NESTING_LEVEL 100
|
||||
|
||||
static unsigned char exif_thumbnail_force_ref[] = {2, BYREF_NONE, BYREF_FORCE_REST};
|
||||
|
||||
/* {{{ exif_functions[]
|
||||
@@ -1430,6 +1438,7 @@ typedef struct {
|
||||
/* for parsing */
|
||||
int read_thumbnail;
|
||||
int read_all;
|
||||
int ifd_nesting_level;
|
||||
/* internal */
|
||||
file_section_list file;
|
||||
} image_info_type;
|
||||
@@ -2689,6 +2698,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);
|
||||
@@ -2702,6 +2718,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" TSRMLS_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. */
|
||||
@@ -3372,7 +3393,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
return FALSE;
|
||||
}
|
||||
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+2), dir_size-2);
|
||||
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
|
||||
/*exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
|
||||
next_offset = php_ifd_get32u(ImageInfo->file.list[sn].data + dir_size - 4, ImageInfo->motorola_intel);
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF done, next offset x%04X", next_offset);
|
||||
@@ -3713,6 +3734,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);
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib php_mbstring.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
|
||||
!ELSEIF "$(CFG)" == "exif - Win32 Debug_TS"
|
||||
|
||||
|
||||
+58
-20
@@ -459,11 +459,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);
|
||||
|
||||
/*
|
||||
@@ -507,7 +507,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;
|
||||
@@ -818,9 +820,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);
|
||||
@@ -1417,7 +1431,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))
|
||||
@@ -1791,11 +1807,28 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
|
||||
}
|
||||
link->errorText = strdup(emg);
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);
|
||||
free(emg);
|
||||
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;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1824,9 +1857,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)
|
||||
}
|
||||
@@ -2084,7 +2120,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);
|
||||
}
|
||||
@@ -2268,7 +2306,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;
|
||||
@@ -2277,7 +2315,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;
|
||||
@@ -2288,9 +2326,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);
|
||||
}
|
||||
@@ -2300,7 +2338,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;
|
||||
@@ -2313,7 +2351,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;
|
||||
@@ -2346,7 +2384,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
*length = l*2+3+1;
|
||||
if (value)
|
||||
{
|
||||
char* r = emalloc(l*2+3+1);
|
||||
char* r = safe_emalloc(l, 2, 4);
|
||||
r[0] = 'X';
|
||||
r[1] = '\'';
|
||||
for (i = 0; i < nBits / 8; i++)
|
||||
@@ -2368,7 +2406,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
*length = l*2+3+1;
|
||||
if (value)
|
||||
{
|
||||
char* r = emalloc(l*2+3+1);
|
||||
char* r = safe_emalloc(l, 2, 4);
|
||||
r[0] = 'B';
|
||||
r[1] = '\'';
|
||||
for (i = 0; i < nBits; i++)
|
||||
@@ -2400,7 +2438,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;
|
||||
@@ -2409,7 +2447,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
@@ -98,11 +98,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;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -145,7 +177,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
|
||||
};
|
||||
|
||||
|
||||
@@ -216,6 +256,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
|
||||
|
||||
+4
-13
@@ -705,7 +705,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
|
||||
@@ -713,19 +715,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));
|
||||
|
||||
@@ -602,6 +602,10 @@ PHP_FUNCTION(ftp_get)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
mode = FTPTYPE_IMAGE;
|
||||
#endif
|
||||
|
||||
if (ftp->autoseek && resumepos) {
|
||||
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
RETURN_FALSE;
|
||||
|
||||
+14
-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
|
||||
@@ -175,7 +175,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
|
||||
@@ -200,7 +200,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
|
||||
@@ -224,19 +224,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 ])
|
||||
@@ -257,8 +257,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
|
||||
@@ -308,7 +309,9 @@ 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, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])
|
||||
|
||||
dnl Make sure the libgd/ is first in the include path
|
||||
GDLIB_CFLAGS="-DHAVE_LIBPNG"
|
||||
|
||||
+417
-392
File diff suppressed because it is too large.
Load diff
+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>
|
||||
|
||||
+2
-2
@@ -1737,8 +1737,8 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
|
||||
rx = r << 1;
|
||||
ry = 0;
|
||||
x = a;
|
||||
old_y2=-1;
|
||||
old_y1=-1;
|
||||
old_y2=-2;
|
||||
old_y1=-2;
|
||||
while (x > 0){
|
||||
if (r > 0) {
|
||||
my1++;my2--;
|
||||
|
||||
+3
-3
@@ -958,7 +958,6 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
|
||||
|
||||
while (*next) {
|
||||
ch = *next;
|
||||
|
||||
/* carriage returns */
|
||||
if (ch == '\r') {
|
||||
penf.x = 0;
|
||||
@@ -985,11 +984,12 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
|
||||
|
||||
/* EAM DEBUG */
|
||||
#if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
|
||||
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL) {
|
||||
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && strcmp(font->face->family_name, "Symbol") == 0) {
|
||||
/* I do not know the significance of the constant 0xf000.
|
||||
* It was determined by inspection of the character codes
|
||||
* stored in Microsoft font symbol.
|
||||
*/
|
||||
/* Convert to the Symbol glyph range only for a Symbol family member */
|
||||
len = gdTcl_UtfToUniChar (next, &ch);
|
||||
ch |= 0xf000;
|
||||
next += len;
|
||||
@@ -1060,7 +1060,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
|
||||
FT_Set_Transform(face, &matrix, NULL);
|
||||
/* Convert character code to glyph index */
|
||||
glyph_index = FT_Get_Char_Index(face, ch);
|
||||
|
||||
|
||||
/* retrieve kerning distance and move pen position */
|
||||
if (use_kerning && previous && glyph_index) {
|
||||
FT_Get_Kerning(face, previous, glyph_index, ft_kerning_default, &delta);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
gdimagefill() function (Bug #19366 (fixed in bundled libgd))
|
||||
Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd))
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
||||
|
||||
@@ -11,7 +11,7 @@ Bug #22544 (TrueColor transparency in PNG images).
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dest = dirname(realpath(__FILE__)) . 'bug22544.png';
|
||||
$dest = dirname(realpath(__FILE__)) . '/bug22544.png';
|
||||
@unlink($dest);
|
||||
$image = imageCreateTruecolor(640, 100);
|
||||
$transparent = imageColorAllocate($image, 0, 0, 0);
|
||||
|
||||
@@ -11,7 +11,7 @@ Bug #24155 (gdImageRotate270 rotation problem).
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dest = dirname(realpath(__FILE__)) . 'bug24155.png';
|
||||
$dest = dirname(realpath(__FILE__)) . '/bug24155.png';
|
||||
@unlink($dest);
|
||||
|
||||
$im = imagecreatetruecolor(30, 50);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
gdimagefill() function (Bug #19366 (fixed in bundled libgd))
|
||||
Bug #27582 (ImageFillToBorder() on alphablending image looses alpha on fill color)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
||||
@@ -8,7 +8,7 @@ gdimagefill() function (Bug #19366 (fixed in bundled libgd))
|
||||
--FILE--
|
||||
<?php
|
||||
/* $id$ */
|
||||
$dest = dirname(realpath(__FILE__)) . 'bug27582.png';
|
||||
$dest = dirname(realpath(__FILE__)) . '/bug27582.png';
|
||||
@unlink($dest);
|
||||
$im = ImageCreateTrueColor(10, 10);
|
||||
imagealphablending($im, true);
|
||||
@@ -18,6 +18,7 @@ $color = ImageColorAllocateAlpha($im, 0, 0, 0, 1);
|
||||
ImageFillToBorder($im, 5, 5, $bordercolor, $color);
|
||||
imagepng($im, $dest);
|
||||
echo md5_file($dest) . "\n";
|
||||
@unlink($dest);
|
||||
?>
|
||||
--EXPECT--
|
||||
08287f8f5d406946009df5f04ca83dc0
|
||||
@@ -11,14 +11,17 @@ Bug #28984 (imagefill segfault using a transparent color).
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$cwd = dirname(__FILE__);
|
||||
|
||||
$im = imagecreatetruecolor(100,100);
|
||||
imagealphablending($im, false);
|
||||
#$alpha = imagecolorallocatealpha($im, 255, 0, 255,0);
|
||||
$alpha = imagecolorallocate($im, 255, 0, 0);
|
||||
imagefill($im, 2, 2, $alpha);
|
||||
#imagesavealpha($im, true);
|
||||
imagepng($im, '1.png');
|
||||
imagepng($im, $cwd . '/1.png');
|
||||
imagedestroy($im);
|
||||
@unlink($cwd . '/1.png');
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -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 @@ 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 @@ 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");
|
||||
|
||||
+99
-30
@@ -205,7 +205,7 @@ ZEND_MODULE_INFO_D(gmp)
|
||||
if(Z_TYPE_PP(zval) == IS_RESOURCE) { \
|
||||
ZEND_FETCH_RESOURCE(gmpnumber, mpz_t *, zval, -1, GMP_RESOURCE_NAME, le_gmp);\
|
||||
} else {\
|
||||
if(convert_to_gmp(&gmpnumber, zval, 0) == FAILURE) {\
|
||||
if(convert_to_gmp(&gmpnumber, zval, 0 TSRMLS_CC) == FAILURE) {\
|
||||
RETURN_FALSE;\
|
||||
}\
|
||||
ZEND_REGISTER_RESOURCE(NULL, gmpnumber, le_gmp);\
|
||||
@@ -217,7 +217,7 @@ if(Z_TYPE_PP(zval) == IS_RESOURCE) { \
|
||||
|
||||
/* {{{ convert_to_gmp
|
||||
* Convert zval to be gmp number */
|
||||
static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base)
|
||||
static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base TSRMLS_DC)
|
||||
{
|
||||
int ret = 0;
|
||||
int skip_lead = 0;
|
||||
@@ -251,7 +251,7 @@ static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING,"Unable to convert variable to GMP - wrong type");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Unable to convert variable to GMP - wrong type");
|
||||
efree(*gmpnumber);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -280,8 +280,8 @@ typedef void (*gmp_binary_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
|
||||
typedef unsigned long (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long);
|
||||
/* }}} */
|
||||
|
||||
#define gmp_zval_binary_ui_op(r, a, b, o, u) gmp_zval_binary_ui_op_ex(r, a, b, o, u, 0 TSRMLS_CC)
|
||||
#define gmp_zval_binary_ui_op2(r, a, b, o, u) gmp_zval_binary_ui_op2_ex(r, a, b, o, u, 0 TSRMLS_CC)
|
||||
#define gmp_zval_binary_ui_op(r, a, b, o, u) gmp_zval_binary_ui_op_ex(r, a, b, o, u, 0, 0 TSRMLS_CC)
|
||||
#define gmp_zval_binary_ui_op2(r, a, b, o, u) gmp_zval_binary_ui_op2_ex(r, a, b, o, u, 0, 0 TSRMLS_CC)
|
||||
|
||||
#define gmp_binary_ui_op(op, uop) _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op, uop)
|
||||
#define gmp_binary_op(op) _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op, NULL)
|
||||
@@ -296,7 +296,7 @@ typedef unsigned long (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, unsig
|
||||
Execute GMP binary operation.
|
||||
May return GMP resource or long if operation allows this
|
||||
*/
|
||||
static inline void gmp_zval_binary_ui_op_ex(zval *return_value, zval **a_arg, zval **b_arg, gmp_binary_op_t gmp_op, gmp_binary_ui_op_t gmp_ui_op, int allow_ui_return TSRMLS_DC)
|
||||
static inline void gmp_zval_binary_ui_op_ex(zval *return_value, zval **a_arg, zval **b_arg, gmp_binary_op_t gmp_op, gmp_binary_ui_op_t gmp_ui_op, int allow_ui_return, int check_b_zero TSRMLS_DC)
|
||||
{
|
||||
mpz_t *gmpnum_a, *gmpnum_b, *gmpnum_result;
|
||||
unsigned long long_result=0;
|
||||
@@ -309,10 +309,20 @@ static inline void gmp_zval_binary_ui_op_ex(zval *return_value, zval **a_arg, zv
|
||||
FETCH_GMP_ZVAL(gmpnum_b, b_arg);
|
||||
}
|
||||
|
||||
if (!Z_LVAL_PP(b_arg)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if(check_b_zero) {
|
||||
int b_is_zero = 0;
|
||||
if(use_ui) {
|
||||
b_is_zero = (Z_LVAL_PP(b_arg) == 0);
|
||||
} else {
|
||||
b_is_zero = !mpz_cmp_ui(*gmpnum_b, 0);
|
||||
}
|
||||
|
||||
if(b_is_zero) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Zero operand not allowed");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
INIT_GMP_NUM(gmpnum_result);
|
||||
if(use_ui && gmp_ui_op) {
|
||||
if(allow_ui_return) {
|
||||
@@ -337,7 +347,7 @@ static inline void gmp_zval_binary_ui_op_ex(zval *return_value, zval **a_arg, zv
|
||||
Execute GMP binary operation which returns 2 values.
|
||||
May return GMP resources or longs if operation allows this.
|
||||
*/
|
||||
static inline void gmp_zval_binary_ui_op2_ex(zval *return_value, zval **a_arg, zval **b_arg, gmp_binary_op2_t gmp_op, gmp_binary_ui_op2_t gmp_ui_op, int allow_ui_return TSRMLS_DC)
|
||||
static inline void gmp_zval_binary_ui_op2_ex(zval *return_value, zval **a_arg, zval **b_arg, gmp_binary_op2_t gmp_op, gmp_binary_ui_op2_t gmp_ui_op, int allow_ui_return, int check_b_zero TSRMLS_DC)
|
||||
{
|
||||
mpz_t *gmpnum_a, *gmpnum_b, *gmpnum_result1, *gmpnum_result2;
|
||||
zval r;
|
||||
@@ -352,10 +362,20 @@ static inline void gmp_zval_binary_ui_op2_ex(zval *return_value, zval **a_arg, z
|
||||
FETCH_GMP_ZVAL(gmpnum_b, b_arg);
|
||||
}
|
||||
|
||||
if (!Z_LVAL_PP(b_arg)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if(check_b_zero) {
|
||||
int b_is_zero = 0;
|
||||
if(use_ui) {
|
||||
b_is_zero = (Z_LVAL_PP(b_arg) == 0);
|
||||
} else {
|
||||
b_is_zero = !mpz_cmp_ui(*gmpnum_b, 0);
|
||||
}
|
||||
|
||||
if(b_is_zero) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Zero operand not allowed");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
INIT_GMP_NUM(gmpnum_result1);
|
||||
INIT_GMP_NUM(gmpnum_result2);
|
||||
|
||||
@@ -504,12 +524,12 @@ ZEND_FUNCTION(gmp_init)
|
||||
convert_to_long_ex(base_arg);
|
||||
base = Z_LVAL_PP(base_arg);
|
||||
if(base < 2 || base > 36) {
|
||||
zend_error(E_WARNING, "Bad base for conversion: %d (should be between 2 and 36)", base);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d (should be between 2 and 36)", base);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(convert_to_gmp(&gmpnumber, number_arg, base) == FAILURE) {
|
||||
if(convert_to_gmp(&gmpnumber, number_arg, base TSRMLS_CC) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -566,7 +586,7 @@ ZEND_FUNCTION(gmp_strval)
|
||||
}
|
||||
|
||||
if(base < 2 || base > 36) {
|
||||
zend_error(E_WARNING, "Bad base for conversion: %d", base);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d", base);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -642,13 +662,13 @@ ZEND_FUNCTION(gmp_div_qr)
|
||||
|
||||
switch(round) {
|
||||
case GMP_ROUND_ZERO:
|
||||
gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_tdiv_qr, (gmp_binary_ui_op2_t)mpz_tdiv_qr_ui);
|
||||
gmp_zval_binary_ui_op2_ex(return_value, a_arg, b_arg, mpz_tdiv_qr, (gmp_binary_ui_op2_t)mpz_tdiv_qr_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_PLUSINF:
|
||||
gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_cdiv_qr, (gmp_binary_ui_op2_t)mpz_cdiv_qr_ui);
|
||||
gmp_zval_binary_ui_op2_ex(return_value, a_arg, b_arg, mpz_cdiv_qr, (gmp_binary_ui_op2_t)mpz_cdiv_qr_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_MINUSINF:
|
||||
gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_fdiv_qr, (gmp_binary_ui_op2_t)mpz_fdiv_qr_ui);
|
||||
gmp_zval_binary_ui_op2_ex(return_value, a_arg, b_arg, mpz_fdiv_qr, (gmp_binary_ui_op2_t)mpz_fdiv_qr_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -677,15 +697,17 @@ ZEND_FUNCTION(gmp_div_r)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch(round) {
|
||||
case GMP_ROUND_ZERO:
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_tdiv_r, (gmp_binary_ui_op_t)mpz_tdiv_r_ui, 1 TSRMLS_CC);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_tdiv_r, (gmp_binary_ui_op_t)mpz_tdiv_r_ui, 1, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_PLUSINF:
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_cdiv_r, (gmp_binary_ui_op_t)mpz_cdiv_r_ui, 1 TSRMLS_CC);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_cdiv_r, (gmp_binary_ui_op_t)mpz_cdiv_r_ui, 1, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_MINUSINF:
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_fdiv_r, (gmp_binary_ui_op_t)mpz_fdiv_r_ui, 1 TSRMLS_CC);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_fdiv_r, (gmp_binary_ui_op_t)mpz_fdiv_r_ui, 1, 1 TSRMLS_CC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -715,13 +737,13 @@ ZEND_FUNCTION(gmp_div_q)
|
||||
|
||||
switch(round) {
|
||||
case GMP_ROUND_ZERO:
|
||||
gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_tdiv_q, (gmp_binary_ui_op_t)mpz_tdiv_q_ui);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_tdiv_q, (gmp_binary_ui_op_t)mpz_tdiv_q_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_PLUSINF:
|
||||
gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_cdiv_q, (gmp_binary_ui_op_t)mpz_cdiv_q_ui);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_cdiv_q, (gmp_binary_ui_op_t)mpz_cdiv_q_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
case GMP_ROUND_MINUSINF:
|
||||
gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_fdiv_q, (gmp_binary_ui_op_t)mpz_fdiv_q_ui);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_fdiv_q, (gmp_binary_ui_op_t)mpz_fdiv_q_ui, 0, 1 TSRMLS_CC);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -738,7 +760,7 @@ ZEND_FUNCTION(gmp_mod)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_mod, (gmp_binary_ui_op_t)mpz_mod_ui, 1 TSRMLS_CC);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_mod, (gmp_binary_ui_op_t)mpz_mod_ui, 1, 1 TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -770,7 +792,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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -795,7 +838,7 @@ ZEND_FUNCTION(gmp_pow)
|
||||
convert_to_long_ex(exp_arg);
|
||||
|
||||
if(Z_LVAL_PP(exp_arg) < 0) {
|
||||
zend_error(E_WARNING,"Negative exponent not supported");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Negative exponent not supported");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -827,6 +870,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);
|
||||
|
||||
@@ -850,7 +897,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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -868,6 +932,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);
|
||||
|
||||
@@ -937,7 +1006,7 @@ ZEND_FUNCTION(gmp_gcd)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_gcd, (gmp_binary_ui_op_t)mpz_gcd_ui, 1 TSRMLS_CC);
|
||||
gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_gcd, (gmp_binary_ui_op_t)mpz_gcd_ui, 1, 0 TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #32773 binary GMP functions returns unexpected value, when second parameter is int(0)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gmp")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo '10 + 0 = ', gmp_strval(gmp_add(10, 0)), "\n";
|
||||
echo '10 + "0" = ', gmp_strval(gmp_add(10, '0')), "\n";
|
||||
|
||||
echo gmp_strval(gmp_div(10, 0))."\n";
|
||||
echo gmp_strval(gmp_div_qr(10, 0))."\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
10 + 0 = 10
|
||||
10 + "0" = 10
|
||||
|
||||
Warning: gmp_div(): Zero operand not allowed in %s on line %d
|
||||
0
|
||||
|
||||
Warning: gmp_div_qr(): Zero operand not allowed in %s on line %d
|
||||
0
|
||||
+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])
|
||||
;;
|
||||
|
||||
+41
-59
@@ -2,7 +2,7 @@ dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then
|
||||
AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then
|
||||
AC_DEFINE(HAVE_IMAP2000, 1, [ ])
|
||||
IMAP_DIR=$i
|
||||
IMAP_INC_DIR=$i$1
|
||||
@@ -13,7 +13,7 @@ AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then
|
||||
break
|
||||
])
|
||||
|
||||
AC_DEFUN(IMAP_LIB_CHK,[
|
||||
AC_DEFUN([IMAP_LIB_CHK],[
|
||||
str="$IMAP_DIR/$1/lib$lib.*"
|
||||
for i in `echo $str`; do
|
||||
test -r $i && IMAP_LIBDIR=$IMAP_DIR/$1 && break 2
|
||||
@@ -21,7 +21,7 @@ AC_DEFUN(IMAP_LIB_CHK,[
|
||||
])
|
||||
|
||||
dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs])
|
||||
AC_DEFUN(PHP_IMAP_TEST_BUILD, [
|
||||
AC_DEFUN([PHP_IMAP_TEST_BUILD], [
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$4 $LIBS"
|
||||
AC_TRY_RUN([
|
||||
@@ -54,42 +54,17 @@ AC_DEFUN(PHP_IMAP_TEST_BUILD, [
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_IMAP_KRB_CHK, [
|
||||
AC_ARG_WITH(kerberos,
|
||||
[ --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.],[
|
||||
PHP_KERBEROS=$withval
|
||||
],[
|
||||
PHP_KERBEROS=no
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_IMAP_KRB_CHK], [
|
||||
if test "$PHP_KERBEROS" != "no"; then
|
||||
|
||||
if test "$PHP_KERBEROS" = "yes"; then
|
||||
SEARCH_PATHS="/usr/kerberos /usr/local /usr"
|
||||
else
|
||||
SEARCH_PATHS=$PHP_KERBEROS
|
||||
fi
|
||||
|
||||
for i in $SEARCH_PATHS; 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 -z "$PHP_KERBEROS_DIR"; then
|
||||
PHP_SETUP_KERBEROS(IMAP_SHARED_LIBADD,
|
||||
[
|
||||
AC_DEFINE(HAVE_IMAP_KRB,1,[ ])
|
||||
], [
|
||||
AC_MSG_ERROR([Kerberos libraries not found.
|
||||
|
||||
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
|
||||
])
|
||||
fi
|
||||
AC_DEFINE(HAVE_IMAP_KRB,1,[ ])
|
||||
PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY(gssapi_krb5, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY(krb5, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY(k5crypto, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY(com_err, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
|
||||
])
|
||||
else
|
||||
AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [
|
||||
AC_MSG_ERROR([This c-client library is built with Kerberos support.
|
||||
@@ -98,31 +73,26 @@ AC_DEFUN(PHP_IMAP_KRB_CHK, [
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_IMAP_SSL_CHK, [
|
||||
AC_ARG_WITH(imap-ssl,
|
||||
[ --with-imap-ssl=<DIR> IMAP: Include SSL support. DIR is the OpenSSL install dir.],[
|
||||
PHP_IMAP_SSL=$withval
|
||||
],[
|
||||
PHP_IMAP_SSL=no
|
||||
])
|
||||
|
||||
if test "$PHP_IMAP_SSL" = "yes"; then
|
||||
PHP_IMAP_SSL=/usr
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether SSL libraries are needed for c-client])
|
||||
|
||||
AC_DEFUN([PHP_IMAP_SSL_CHK], [
|
||||
if test "$PHP_IMAP_SSL" != "no"; then
|
||||
AC_MSG_RESULT([$PHP_IMAP_SSL/lib])
|
||||
AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
|
||||
PHP_ADD_LIBRARY_DEFER(ssl, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_DEFER(crypto, 1, IMAP_SHARED_LIBADD)
|
||||
PHP_ADD_LIBPATH($PHP_IMAP_SSL/lib, IMAP_SHARED_LIBADD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
PHP_SETUP_OPENSSL(IMAP_SHARED_LIBADD,
|
||||
[
|
||||
AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
|
||||
], [
|
||||
AC_MSG_ERROR([OpenSSL libraries not found.
|
||||
|
||||
Check the path given to --with-openssl-dir and output in config.log)
|
||||
])
|
||||
])
|
||||
elif test -f "$IMAP_INC_DIR/linkage.c"; then
|
||||
AC_EGREP_HEADER(ssl_onceonlyinit, $IMAP_INC_DIR/linkage.c, [
|
||||
AC_MSG_ERROR([This c-client library is built with SSL support.
|
||||
|
||||
Add --with-imap-ssl to your configure line. Check config.log for details.
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -130,8 +100,14 @@ AC_DEFUN(PHP_IMAP_SSL_CHK, [
|
||||
PHP_ARG_WITH(imap,for IMAP support,
|
||||
[ --with-imap[=DIR] Include IMAP support. DIR is the c-client install prefix.])
|
||||
|
||||
if test "$PHP_IMAP" != "no"; then
|
||||
PHP_ARG_WITH(kerberos,for IMAP Kerberos support,
|
||||
[ --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install prefix.], no, no)
|
||||
|
||||
PHP_ARG_WITH(imap-ssl,for IMAP SSL support,
|
||||
[ --with-imap-ssl[=DIR] IMAP: Include SSL support. DIR is the OpenSSL install prefix.], no, no)
|
||||
|
||||
|
||||
if test "$PHP_IMAP" != "no"; then
|
||||
PHP_SUBST(IMAP_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
|
||||
AC_DEFINE(HAVE_IMAP,1,[ ])
|
||||
@@ -146,6 +122,12 @@ if test "$PHP_IMAP" != "no"; then
|
||||
fi
|
||||
done
|
||||
|
||||
dnl Check for c-client version 2004
|
||||
AC_EGREP_HEADER(mail_fetch_overview_sequence, $IMAP_INC_DIR/mail.h, [
|
||||
AC_DEFINE(HAVE_IMAP2004,1,[ ])
|
||||
])
|
||||
|
||||
dnl Check for c-client version 2001
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$IMAP_INC_DIR
|
||||
AC_EGREP_CPP(this_is_true, [
|
||||
@@ -173,7 +155,7 @@ if test "$PHP_IMAP" != "no"; then
|
||||
PHP_EXPAND_PATH($IMAP_DIR, IMAP_DIR)
|
||||
|
||||
if test -z "$IMAP_DIR"; then
|
||||
AC_MSG_ERROR(Cannot find rfc822.h. Please check your IMAP installation.)
|
||||
AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
|
||||
fi
|
||||
|
||||
if test -r "$IMAP_DIR/c-client/c-client.a"; then
|
||||
@@ -189,7 +171,7 @@ if test "$PHP_IMAP" != "no"; then
|
||||
done
|
||||
|
||||
if test -z "$IMAP_LIBDIR"; then
|
||||
AC_MSG_ERROR(Cannot find imap library (libc-client.a). Please check your IMAP installation.)
|
||||
AC_MSG_ERROR(Cannot find imap library (libc-client.a). Please check your c-client installation.)
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($IMAP_INC_DIR)
|
||||
|
||||
+71
-29
@@ -57,7 +57,8 @@
|
||||
MAILSTREAM DEFAULTPROTO;
|
||||
#endif
|
||||
|
||||
#define CRLF "\015\012"
|
||||
#define CRLF "\015\012"
|
||||
#define CRLF_LEN sizeof("\015\012") - 1
|
||||
#define PHP_EXPUNGE 32768
|
||||
#define PHP_IMAP_ADDRESS_SIZE_BUF 10
|
||||
|
||||
@@ -680,7 +681,9 @@ PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
PHP_MINFO_FUNCTION(imap)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
#if HAVE_IMAP2001
|
||||
#if HAVE_IMAP2004
|
||||
php_info_print_table_row(2, "IMAP c-Client Version", "2004");
|
||||
#elif HAVE_IMAP2001
|
||||
php_info_print_table_row(2, "IMAP c-Client Version", "2001");
|
||||
#elif HAVE_IMAP2000
|
||||
php_info_print_table_row(2, "IMAP c-Client Version", "2000");
|
||||
@@ -692,7 +695,7 @@ PHP_MINFO_FUNCTION(imap)
|
||||
#if HAVE_IMAP_SSL
|
||||
php_info_print_table_row(2, "SSL Support", "enabled");
|
||||
#endif
|
||||
#if HAVE_IMAP_KRB
|
||||
#if HAVE_IMAP_KRB && HAVE_IMAP_AUTH_GSS
|
||||
php_info_print_table_row(2, "Kerberos Support", "enabled");
|
||||
#endif
|
||||
php_info_print_table_end();
|
||||
@@ -1479,11 +1482,19 @@ PHP_FUNCTION(imap_headerinfo)
|
||||
convert_to_long_ex(msgno);
|
||||
if (myargc >= 3) {
|
||||
convert_to_long_ex(fromlength);
|
||||
if (Z_LVAL_PP(fromlength) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
fromlength = 0x00;
|
||||
}
|
||||
if (myargc >= 4) {
|
||||
convert_to_long_ex(subjectlength);
|
||||
if (Z_LVAL_PP(subjectlength) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
subjectlength = 0x00;
|
||||
}
|
||||
@@ -1754,7 +1765,7 @@ PHP_FUNCTION(imap_fetchstructure)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string imap_fetchbody(resource stream_id, int msg_no, int section [, int options])
|
||||
/* {{{ proto string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])
|
||||
Get a specific body section */
|
||||
PHP_FUNCTION(imap_fetchbody)
|
||||
{
|
||||
@@ -2423,8 +2434,13 @@ PHP_FUNCTION(imap_sort)
|
||||
}
|
||||
if (myargc >= 4) {
|
||||
convert_to_long_ex(flags);
|
||||
if (Z_LVAL_PP(flags) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Search options parameter has to be greater than or equal to 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
if (myargc >= 5) {
|
||||
convert_to_string_ex(criteria);
|
||||
search_criteria = estrndup(Z_STRVAL_PP(criteria), Z_STRLEN_PP(criteria));
|
||||
spg = mail_criteria(search_criteria);
|
||||
efree(search_criteria);
|
||||
@@ -2578,7 +2594,7 @@ PHP_FUNCTION(imap_status)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto object imap_bodystruct(resource stream_id, int msg_no, int section)
|
||||
/* {{{ proto object imap_bodystruct(resource stream_id, int msg_no, string section)
|
||||
Read the structure of a specified body section of a specific message */
|
||||
PHP_FUNCTION(imap_bodystruct)
|
||||
{
|
||||
@@ -2607,6 +2623,10 @@ PHP_FUNCTION(imap_bodystruct)
|
||||
}
|
||||
|
||||
body=mail_body(imap_le_struct->imap_stream, Z_LVAL_PP(msg), Z_STRVAL_PP(section));
|
||||
if (body == NULL) {
|
||||
zval_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (body->type <= TYPEMAX) {
|
||||
add_property_long(return_value, "type", body->type);
|
||||
}
|
||||
@@ -2949,6 +2969,10 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1);
|
||||
memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue)+1);
|
||||
bod->contents.text.size = Z_STRLEN_PP(pvalue);
|
||||
} else {
|
||||
bod->contents.text.data = (char *) fs_get(1);
|
||||
memcpy(bod->contents.text.data, "", 1);
|
||||
bod->contents.text.size = 0;
|
||||
}
|
||||
if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) {
|
||||
convert_to_long_ex(pvalue);
|
||||
@@ -2991,7 +3015,8 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
if (zend_hash_find(Z_ARRVAL_PP(data), "charset", sizeof("charset"), (void **) &pvalue)== SUCCESS) {
|
||||
convert_to_string_ex(pvalue);
|
||||
tmp_param = mail_newbody_parameter();
|
||||
tmp_param->value = cpystr(Z_STRVAL_PP(pvalue));
|
||||
tmp_param->value = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1);
|
||||
memcpy(tmp_param->value, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue) + 1);
|
||||
tmp_param->attribute = "CHARSET";
|
||||
tmp_param->next = bod->parameter;
|
||||
bod->parameter = tmp_param;
|
||||
@@ -3052,6 +3077,10 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1);
|
||||
memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue) + 1);
|
||||
bod->contents.text.size = Z_STRLEN_PP(pvalue);
|
||||
} else {
|
||||
bod->contents.text.data = (char *) fs_get(1);
|
||||
memcpy(bod->contents.text.data, "", 1);
|
||||
bod->contents.text.size = 0;
|
||||
}
|
||||
if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) {
|
||||
convert_to_long_ex(pvalue);
|
||||
@@ -3065,9 +3094,14 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
convert_to_string_ex(pvalue);
|
||||
bod->md5 = cpystr(Z_STRVAL_PP(pvalue));
|
||||
}
|
||||
|
||||
zend_hash_move_forward(Z_ARRVAL_PP(body));
|
||||
}
|
||||
zend_hash_move_forward(Z_ARRVAL_PP(body));
|
||||
}
|
||||
|
||||
if (bod && bod->type == TYPEMULTIPART && (!bod->nested.part || !bod->nested.part->next)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot generate multipart e-mail without components.");
|
||||
RETVAL_FALSE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rfc822_encode_body_7bit(env, topbod);
|
||||
@@ -3075,17 +3109,29 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
|
||||
/* add custom envelope headers */
|
||||
if (custom_headers_param) {
|
||||
int l = strlen(tmp) - 2, l2;
|
||||
PARAMETER *tp = custom_headers_param;
|
||||
|
||||
/* remove last CRLF from tmp */
|
||||
tmp[strlen(tmp) - 2] = '\0';
|
||||
tempstring = emalloc(strlen(tmp) + 1);
|
||||
strcpy(tempstring, tmp);
|
||||
tmp[l] = '\0';
|
||||
tempstring = emalloc(l);
|
||||
memcpy(tempstring, tmp, l);
|
||||
|
||||
do {
|
||||
tempstring = erealloc(tempstring, strlen(tempstring) + strlen(custom_headers_param->value) + strlen(CRLF) + 1);
|
||||
sprintf(tempstring, "%s%s%s", tempstring, custom_headers_param->value, CRLF);
|
||||
l2 = strlen(custom_headers_param->value);
|
||||
tempstring = erealloc(tempstring, l + l2 + CRLF_LEN + 1);
|
||||
memcpy(tempstring + l, custom_headers_param->value, l2);
|
||||
memcpy(tempstring + l + l2, CRLF, CRLF_LEN);
|
||||
l += l2 + CRLF_LEN;
|
||||
} while ((custom_headers_param = custom_headers_param->next));
|
||||
|
||||
mystring = emalloc(strlen(tempstring) + strlen(CRLF) + 1);
|
||||
sprintf(mystring, "%s%s", tempstring, CRLF);
|
||||
mail_free_body_parameter(&tp);
|
||||
|
||||
mystring = emalloc(l + CRLF_LEN + 1);
|
||||
memcpy(mystring, tempstring, l);
|
||||
memcpy(mystring + l , CRLF, CRLF_LEN);
|
||||
mystring[l + CRLF_LEN] = '\0';
|
||||
|
||||
efree(tempstring);
|
||||
} else {
|
||||
mystring = emalloc(strlen(tmp) + 1);
|
||||
@@ -3132,36 +3178,32 @@ PHP_FUNCTION(imap_mail_compose)
|
||||
bod=&part->body;
|
||||
|
||||
tempstring=emalloc(strlen(bod->contents.text.data)+strlen(CRLF)+strlen(mystring)+1);
|
||||
strcpy(tempstring, mystring);
|
||||
sprintf(tempstring, "%s%s%s", mystring, bod->contents.text.data, CRLF);
|
||||
efree(mystring);
|
||||
mystring=tempstring;
|
||||
sprintf(mystring, "%s%s%s", mystring, bod->contents.text.data, CRLF);
|
||||
|
||||
} while ((part = part->next)); /* until done */
|
||||
|
||||
/* output trailing cookie */
|
||||
sprintf(tmp, "--%s--", cookie);
|
||||
tempstring=emalloc(strlen(tmp)+strlen(CRLF)+strlen(mystring)+1);
|
||||
strcpy(tempstring, mystring);
|
||||
sprintf(tempstring, "%s%s%s", mystring, tmp, CRLF);
|
||||
efree(mystring);
|
||||
mystring=tempstring;
|
||||
sprintf(mystring, "%s%s%s", mystring, tmp, CRLF);
|
||||
|
||||
} else if (bod) {
|
||||
|
||||
tempstring=emalloc(strlen(bod->contents.text.data)+strlen(CRLF)+strlen(mystring)+1);
|
||||
strcpy(tempstring, mystring);
|
||||
tempstring = emalloc(strlen(bod->contents.text.data)+strlen(CRLF)+strlen(mystring)+1);
|
||||
sprintf(tempstring, "%s%s%s", mystring, bod->contents.text.data, CRLF);
|
||||
efree(mystring);
|
||||
mystring=tempstring;
|
||||
sprintf(mystring, "%s%s%s", mystring, bod->contents.text.data, CRLF);
|
||||
|
||||
} else {
|
||||
efree(mystring);
|
||||
RETURN_FALSE;
|
||||
RETVAL_FALSE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
RETVAL_STRINGL(mystring, strlen(mystring), 1);
|
||||
efree(tempstring);
|
||||
RETVAL_STRING(tempstring, 0);
|
||||
done:
|
||||
mail_free_body(&topbod);
|
||||
mail_free_envelope(&env);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+1
-1
@@ -498,7 +498,7 @@ EXEC SQL END DECLARE SECTION;
|
||||
int host_len = 0, user_len = 0, passwd_len = 0;
|
||||
host = user = passwd = NULL;
|
||||
|
||||
/* set default values if any are avaliable */
|
||||
/* set default values if any are available */
|
||||
if (IFXG(default_host)) {
|
||||
host = IFXG(default_host);
|
||||
host_len = strlen(host);
|
||||
|
||||
@@ -29,7 +29,9 @@ if test "$PHP_INGRES" != "no"; then
|
||||
AC_MSG_ERROR(Cannot find libiiapi.a under $II_DIR/lib)
|
||||
fi
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH(iiapi, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(ingres, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(iiapi.1, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(q.1, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(frame.1, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(compat.1, $II_LIB_DIR, II_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($II_INC_DIR)
|
||||
fi
|
||||
@@ -1802,9 +1802,9 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int sca
|
||||
short j;
|
||||
long n, f = 1;
|
||||
if ( (type & ~1) == SQL_SHORT) {
|
||||
n = (long) *(short *) (data);
|
||||
n = *(short *) data;
|
||||
}else {
|
||||
n = (long) *(long *) (data);
|
||||
n = *(ISC_LONG *) data;
|
||||
}
|
||||
for (j = 0; j < -scale; j++) {
|
||||
f *= 10;
|
||||
@@ -1821,9 +1821,9 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int sca
|
||||
} else {
|
||||
Z_TYPE_P(val) = IS_LONG;
|
||||
if ( (type & ~1) == SQL_SHORT) {
|
||||
Z_LVAL_P(val) = *(short *) (data);
|
||||
Z_LVAL_P(val) = *(short *) data;
|
||||
}else{
|
||||
Z_LVAL_P(val) = *(long *) (data);
|
||||
Z_LVAL_P(val) = *(ISC_LONG *) data;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
AC_DEFUN(JAVA_FIND_JAR, [
|
||||
AC_DEFUN([JAVA_FIND_JAR], [
|
||||
AC_MSG_CHECKING([Java Jar location])
|
||||
if test "$PHP_JAVA" = "yes"; then
|
||||
if JAVA_JAR=`which jar 2>/dev/null`; then
|
||||
@@ -31,7 +31,7 @@ AC_DEFUN(JAVA_FIND_JAR, [
|
||||
AC_MSG_RESULT([$JAVA_JAR])
|
||||
])
|
||||
|
||||
AC_DEFUN(JAVA_FIND_C, [
|
||||
AC_DEFUN([JAVA_FIND_C], [
|
||||
AC_MSG_CHECKING([Java C location])
|
||||
if test "$PHP_JAVA" = "yes"; then
|
||||
JAVA_C=`which javac`
|
||||
@@ -55,7 +55,7 @@ e.g. --with-java=/java expecting /java/bin/ to contain the binaries])
|
||||
AC_MSG_RESULT([$JAVA_C])
|
||||
])
|
||||
|
||||
AC_DEFUN(JAVA_CHECK_LIB, [
|
||||
AC_DEFUN([JAVA_CHECK_LIB], [
|
||||
AC_MSG_CHECKING([Checking for libjava])
|
||||
if test -d $PHP_JAVA/lib/kaffe; then
|
||||
PHP_ADD_LIBPATH($PHP_JAVA/lib)
|
||||
|
||||
+15
-5
@@ -2,7 +2,7 @@ dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
AC_DEFUN(PHP_LDAP_CHECKS, [
|
||||
AC_DEFUN([PHP_LDAP_CHECKS], [
|
||||
if test -f $1/include/ldap.h; then
|
||||
LDAP_DIR=$1
|
||||
LDAP_INCDIR=$1/include
|
||||
@@ -99,7 +99,9 @@ if test "$PHP_LDAP" != "no"; then
|
||||
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_ORALDAP,1,[ ])
|
||||
|
||||
if test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
|
||||
AC_DEFINE(HAVE_ORALDAP_10,1,[ ])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR(Cannot find ldap libraries in $LDAP_LIBDIR.)
|
||||
fi
|
||||
@@ -112,8 +114,6 @@ if test "$PHP_LDAP" != "no"; then
|
||||
_SAVE_CPPFLAGS=$CPPFLAGS
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR"
|
||||
LDFLAGS="$LDFLAGS $LDAP_SHARED_LIBADD"
|
||||
|
||||
AC_CACHE_CHECK([for 3 arg ldap_set_rebind_proc], ac_cv_3arg_setrebindproc,
|
||||
[AC_TRY_COMPILE([#include <ldap.h>], [ldap_set_rebind_proc(0,0,0)],
|
||||
ac_cv_3arg_setrebindproc=yes, ac_cv_3arg_setrebindproc=no)])
|
||||
@@ -124,6 +124,16 @@ if test "$PHP_LDAP" != "no"; then
|
||||
|
||||
dnl Solaris 2.8 claims to be 2004 API, but doesn't have
|
||||
dnl ldap_parse_reference() nor ldap_start_tls_s()
|
||||
AC_CHECK_FUNCS([ldap_parse_reference ldap_start_tls_s])
|
||||
AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s])
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
|
||||
dnl
|
||||
dnl Sanity check
|
||||
dnl
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $LDAP_SHARED_LIBADD"
|
||||
AC_CHECK_FUNC(ldap_bind_s, [], [
|
||||
AC_MSG_ERROR([LDAP build check failed. Please check config.log for more information.])
|
||||
])
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
fi
|
||||
+190
-207
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -209,7 +209,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /D HAVE_LDAP_PARSE_REFERENCE=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
@@ -236,7 +236,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\openldap\include" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "COMPILE_DL_LDAP" /D "HAVE_LDAP_START_TLS_S" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LDAP=1 /D HAVE_LDAP_PARSE_REFERENCE=1 /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
|
||||
+7
-15
@@ -34,59 +34,51 @@ extern zend_module_entry ldap_module_entry;
|
||||
/* LDAP functions */
|
||||
PHP_MINIT_FUNCTION(ldap);
|
||||
PHP_MSHUTDOWN_FUNCTION(ldap);
|
||||
|
||||
PHP_MINFO_FUNCTION(ldap);
|
||||
|
||||
PHP_FUNCTION(ldap_connect);
|
||||
|
||||
PHP_FUNCTION(ldap_bind);
|
||||
PHP_FUNCTION(ldap_unbind);
|
||||
|
||||
PHP_FUNCTION(ldap_read);
|
||||
PHP_FUNCTION(ldap_list);
|
||||
PHP_FUNCTION(ldap_search);
|
||||
|
||||
PHP_FUNCTION(ldap_free_result);
|
||||
PHP_FUNCTION(ldap_count_entries);
|
||||
|
||||
PHP_FUNCTION(ldap_first_entry);
|
||||
PHP_FUNCTION(ldap_next_entry);
|
||||
PHP_FUNCTION(ldap_get_entries);
|
||||
PHP_FUNCTION(ldap_first_attribute);
|
||||
PHP_FUNCTION(ldap_next_attribute);
|
||||
PHP_FUNCTION(ldap_get_attributes);
|
||||
|
||||
PHP_FUNCTION(ldap_get_values);
|
||||
PHP_FUNCTION(ldap_get_values_len);
|
||||
|
||||
PHP_FUNCTION(ber_free);
|
||||
PHP_FUNCTION(ldap_get_dn);
|
||||
PHP_FUNCTION(ldap_explode_dn);
|
||||
PHP_FUNCTION(ldap_dn2ufn);
|
||||
|
||||
PHP_FUNCTION(ldap_add);
|
||||
PHP_FUNCTION(ldap_delete);
|
||||
|
||||
PHP_FUNCTION(ldap_mod_add);
|
||||
PHP_FUNCTION(ldap_mod_replace);
|
||||
PHP_FUNCTION(ldap_mod_del);
|
||||
|
||||
PHP_FUNCTION(ldap_errno);
|
||||
PHP_FUNCTION(ldap_err2str);
|
||||
PHP_FUNCTION(ldap_error);
|
||||
|
||||
PHP_FUNCTION(ldap_compare);
|
||||
|
||||
PHP_FUNCTION(ldap_sort);
|
||||
|
||||
#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP
|
||||
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
|
||||
PHP_FUNCTION(ldap_get_option);
|
||||
PHP_FUNCTION(ldap_set_option);
|
||||
PHP_FUNCTION(ldap_parse_result);
|
||||
PHP_FUNCTION(ldap_first_reference);
|
||||
PHP_FUNCTION(ldap_next_reference);
|
||||
PHP_FUNCTION(ldap_parse_reference);
|
||||
PHP_FUNCTION(ldap_rename);
|
||||
#ifdef HAVE_LDAP_PARSE_RESULT
|
||||
PHP_FUNCTION(ldap_parse_result);
|
||||
#endif
|
||||
#ifdef HAVE_LDAP_PARSE_REFERENCE
|
||||
PHP_FUNCTION(ldap_parse_reference);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LDAP_API_VERSION > 2000
|
||||
|
||||
@@ -106,6 +106,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [
|
||||
libmbfl/filters/mbfilter_iso8859_13.c
|
||||
libmbfl/filters/mbfilter_iso8859_14.c
|
||||
libmbfl/filters/mbfilter_iso8859_15.c
|
||||
libmbfl/filters/mbfilter_iso8859_16.c
|
||||
libmbfl/filters/mbfilter_iso8859_2.c
|
||||
libmbfl/filters/mbfilter_iso8859_3.c
|
||||
libmbfl/filters/mbfilter_iso8859_4.c
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
Den V. Tsopa <tdv@edisoft.ru>
|
||||
Hironori Sato <satoh@jpnnet.com>
|
||||
Shigeru Kanemoto <sgk@happysize.co.jp>
|
||||
Tsukada Takuya <tsukada@fminn.nagano.nagano.jp>
|
||||
U. Kenkichi <kenkichi@axes.co.jp>
|
||||
Tateyama <tateyan@amy.hi-ho.ne.jp>
|
||||
Marcus Boerger <helly@php.net>
|
||||
Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
Rui Hirokawa <hirokawa@php.net>
|
||||
Other gracious contributors
|
||||
Shigeru Kanemoto <sgk@happysize.co.jp>
|
||||
Tsukada Takuya <tsukada@fminn.nagano.nagano.jp>
|
||||
Tateyama <tateyan@amy.hi-ho.ne.jp>
|
||||
U. Kenkichi <kenkichi@axes.co.jp>
|
||||
Wez Furlong <wez@thebrainroom.com>
|
||||
@@ -1,2 +1,5 @@
|
||||
EXTRA_DIST=AUTHORS DISCLAIMER
|
||||
EXTRA_DIST=AUTHORS DISCLAIMER LICENSE Makefile.bcc32 \
|
||||
config.h.bcc32 config.h.vc6 \
|
||||
libmbfl.dsp libmbfl.dsw libmbfl.sln libmbfl.vcproj mbfl.rc \
|
||||
mksbcc32.bat rules.mak.bcc32
|
||||
SUBDIRS = nls filters mbfl
|
||||
@@ -5,12 +5,12 @@ SUBDIRS=mbfl nls filters
|
||||
all: mbfl.dll mbfl.lib
|
||||
|
||||
mbfl.lib: mbfl.dll
|
||||
implib mbfl.lib mbfl.dll
|
||||
implib -a mbfl.lib mbfl.dll
|
||||
|
||||
mbfl.dll: compile mbfl.def mbfl.res
|
||||
mbfl.dll: compile mbfl.res
|
||||
@if exist linker.rsp del linker.rsp
|
||||
@for %i in ($(SUBDIRS)) do @for %j in (%i\*.obj) do @echo %j+ >> linker.rsp
|
||||
ilink32 $(LDFLAGS) @linker.rsp,mbfl.dll,,$(LIBS),mbfl.def,mbfl.res
|
||||
ilink32 $(LDFLAGS) @linker.rsp,mbfl.dll,,$(LIBS),,mbfl.res
|
||||
del linker.rsp
|
||||
|
||||
mbfl.res: mbfl.rc
|
||||
@@ -22,6 +22,8 @@ prepare: config.h.bcc32
|
||||
|
||||
clean:
|
||||
@for %i in ($(SUBDIRS)) do $(COMSPEC) /C mksbcc32.bat $(MAKE) %i clean
|
||||
@if exist linker.rsp del linker.rsp
|
||||
@if exist mbfl.RES del mbfl.RES
|
||||
@if exist mbfl.dll del mbfl.dll
|
||||
@if exist mbfl.lib del mbfl.lib
|
||||
@if exist config.h del config.h
|
||||
|
||||
@@ -5,4 +5,4 @@ See LICENSE and DISCLAIMER for licensing information.
|
||||
|
||||
See the file INSTALL for building and installation instructions.
|
||||
|
||||
# $Id: README,v 1.1.2.2 2003/08/24 18:18:51 moriyoshi Exp
|
||||
# $Id$
|
||||
@@ -3,6 +3,9 @@
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#undef HAVE_ASSERT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@@ -47,6 +50,9 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
@@ -65,6 +71,9 @@
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([libmbfl],[1.0.0])
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR([mbfl/mbfilter.c])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_INIT(mbfl/mbfilter.c)
|
||||
AM_INIT_AUTOMAKE(libmbfl, 1.0.0)
|
||||
AC_CONFIG_SRCDIR(mbfl/mbfilter.c)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
SHLIB_VERSION="1:0:0"
|
||||
AC_SUBST(SHLIB_VERSION)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -25,5 +28,11 @@ AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
AC_CHECK_FUNCS([strcasecmp strchr])
|
||||
|
||||
AC_CHECK_PROGS([FETCH_VIA_FTP], [wget curl ncftpget])
|
||||
|
||||
if test "$FETCH_VIA_FTP" = "curl"; then
|
||||
FETCH_VIA_FTP="curl -O"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile mbfl/Makefile filters/Makefile nls/Makefile])
|
||||
AC_OUTPUT
|
||||
@@ -1,3 +1,104 @@
|
||||
EXTRA_DIST=Makefile.bcc32 mk_sb_tbl.awk
|
||||
noinst_LTLIBRARIES=libmbfl_filters.la
|
||||
INCLUDES=-I../mbfl
|
||||
libmbfl_filters_la_SOURCES=mbfilter_cp936.c mbfilter_hz.c mbfilter_euc_tw.c mbfilter_big5.c mbfilter_euc_jp.c mbfilter_jis.c mbfilter_iso8859_1.c mbfilter_iso8859_2.c mbfilter_cp1252.c mbfilter_cp1251.c mbfilter_ascii.c mbfilter_iso8859_3.c mbfilter_iso8859_4.c mbfilter_iso8859_5.c mbfilter_iso8859_6.c mbfilter_iso8859_7.c mbfilter_iso8859_8.c mbfilter_iso8859_9.c mbfilter_iso8859_10.c mbfilter_iso8859_13.c mbfilter_iso8859_14.c mbfilter_iso8859_15.c mbfilter_htmlent.c mbfilter_byte2.c mbfilter_byte4.c mbfilter_uuencode.c mbfilter_base64.c mbfilter_sjis.c mbfilter_7bit.c mbfilter_qprint.c mbfilter_ucs4.c mbfilter_ucs2.c mbfilter_utf32.c mbfilter_utf16.c mbfilter_utf8.c mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_euc_jp_win.c mbfilter_cp932.c mbfilter_euc_cn.c mbfilter_euc_kr.c mbfilter_uhc.c mbfilter_iso2022_kr.c mbfilter_cp866.c mbfilter_koi8r.c html_entities.c
|
||||
libmbfl_filters_la_LDFLAGS=-version-info $(SHLIB_VERSION)
|
||||
libmbfl_filters_la_SOURCES=mbfilter_cp936.c mbfilter_hz.c mbfilter_euc_tw.c mbfilter_big5.c mbfilter_euc_jp.c mbfilter_jis.c mbfilter_iso8859_1.c mbfilter_iso8859_2.c mbfilter_cp1252.c mbfilter_cp1251.c mbfilter_ascii.c mbfilter_iso8859_3.c mbfilter_iso8859_4.c mbfilter_iso8859_5.c mbfilter_iso8859_6.c mbfilter_iso8859_7.c mbfilter_iso8859_8.c mbfilter_iso8859_9.c mbfilter_iso8859_10.c mbfilter_iso8859_13.c mbfilter_iso8859_14.c mbfilter_iso8859_15.c mbfilter_iso8859_16.c mbfilter_htmlent.c mbfilter_byte2.c mbfilter_byte4.c mbfilter_uuencode.c mbfilter_base64.c mbfilter_sjis.c mbfilter_7bit.c mbfilter_qprint.c mbfilter_ucs4.c mbfilter_ucs2.c mbfilter_utf32.c mbfilter_utf16.c mbfilter_utf8.c mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_euc_jp_win.c mbfilter_cp932.c mbfilter_euc_cn.c mbfilter_euc_kr.c mbfilter_uhc.c mbfilter_iso2022_kr.c mbfilter_cp866.c mbfilter_koi8r.c html_entities.c cp932_table.h html_entities.h mbfilter_7bit.h mbfilter_ascii.h mbfilter_base64.h mbfilter_big5.h mbfilter_byte2.h mbfilter_byte4.h mbfilter_cp1251.h mbfilter_cp1252.h mbfilter_cp866.h mbfilter_cp932.h mbfilter_cp936.h mbfilter_euc_cn.h mbfilter_euc_jp.h mbfilter_euc_jp_win.h mbfilter_euc_kr.h mbfilter_euc_tw.h mbfilter_htmlent.h mbfilter_hz.h mbfilter_iso2022_kr.h mbfilter_iso8859_1.h mbfilter_iso8859_10.h mbfilter_iso8859_13.h mbfilter_iso8859_14.h mbfilter_iso8859_15.h mbfilter_iso8859_16.h mbfilter_iso8859_2.h mbfilter_iso8859_3.h mbfilter_iso8859_4.h mbfilter_iso8859_5.h mbfilter_iso8859_6.h mbfilter_iso8859_7.h mbfilter_iso8859_8.h mbfilter_iso8859_9.h mbfilter_jis.h mbfilter_koi8r.h mbfilter_qprint.h mbfilter_sjis.h mbfilter_ucs2.h mbfilter_ucs4.h mbfilter_uhc.h mbfilter_utf16.h mbfilter_utf32.h mbfilter_utf7.h mbfilter_utf7imap.h mbfilter_utf8.h mbfilter_uuencode.h unicode_prop.h unicode_table_big5.h unicode_table_cns11643.h unicode_table_cp1251.h unicode_table_cp1252.h unicode_table_cp866.h unicode_table_cp932_ext.h unicode_table_cp936.h unicode_table_iso8859_10.h unicode_table_iso8859_13.h unicode_table_iso8859_14.h unicode_table_iso8859_15.h unicode_table_iso8859_16.h unicode_table_iso8859_2.h unicode_table_iso8859_3.h unicode_table_iso8859_4.h unicode_table_iso8859_5.h unicode_table_iso8859_6.h unicode_table_iso8859_7.h unicode_table_iso8859_8.h unicode_table_iso8859_9.h unicode_table_jis.h unicode_table_koi8r.h unicode_table_uhc.h
|
||||
|
||||
mbfilter_iso8859_2.c: unicode_table_iso8859_2.h
|
||||
|
||||
mbfilter_iso8859_3.c: unicode_table_iso8859_3.h
|
||||
|
||||
mbfilter_iso8859_4.c: unicode_table_iso8859_4.h
|
||||
|
||||
mbfilter_iso8859_5.c: unicode_table_iso8859_5.h
|
||||
|
||||
mbfilter_iso8859_6.c: unicode_table_iso8859_6.h
|
||||
|
||||
mbfilter_iso8859_7.c: unicode_table_iso8859_7.h
|
||||
|
||||
mbfilter_iso8859_8.c: unicode_table_iso8859_8.h
|
||||
|
||||
mbfilter_iso8859_9.c: unicode_table_iso8859_9.h
|
||||
|
||||
mbfilter_iso8859_10.c: unicode_table_iso8859_10.h
|
||||
|
||||
mbfilter_iso8859_11.c: unicode_table_iso8859_11.h
|
||||
|
||||
mbfilter_iso8859_13.c: unicode_table_iso8859_13.h
|
||||
|
||||
mbfilter_iso8859_14.c: unicode_table_iso8859_13.h
|
||||
|
||||
mbfilter_iso8859_15.c: unicode_table_iso8859_15.h
|
||||
|
||||
mbfilter_iso8859_16.c: unicode_table_iso8859_16.h
|
||||
|
||||
8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \
|
||||
8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT 8859-13.TXT \
|
||||
8859-14.TXT 8859-15.TXT 8859-16.TXT:
|
||||
$(FETCH_VIA_FTP) ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/$@
|
||||
|
||||
unicode_table_iso8859_1.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_1_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_1_H -f mk_sb_tbl.awk 8859-1.TXT > $@
|
||||
|
||||
unicode_table_iso8859_2.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_2_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_2_H -f mk_sb_tbl.awk 8859-2.TXT > $@
|
||||
|
||||
unicode_table_iso8859_3.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_3_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_3_H -f mk_sb_tbl.awk 8859-3.TXT > $@
|
||||
|
||||
unicode_table_iso8859_4.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_4_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_4_H -f mk_sb_tbl.awk 8859-4.TXT > $@
|
||||
|
||||
unicode_table_iso8859_5.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_5_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_5_H -f mk_sb_tbl.awk 8859-5.TXT > $@
|
||||
|
||||
unicode_table_iso8859_6.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_6_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_6_H -f mk_sb_tbl.awk 8859-6.TXT > $@
|
||||
|
||||
unicode_table_iso8859_7.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_7_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_7_H -f mk_sb_tbl.awk 8859-7.TXT > $@
|
||||
|
||||
unicode_table_iso8859_8.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_8_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_8_H -f mk_sb_tbl.awk 8859-8.TXT > $@
|
||||
|
||||
unicode_table_iso8859_9.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_9_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_9_H -f mk_sb_tbl.awk 8859-9.TXT > $@
|
||||
|
||||
unicode_table_iso8859_10.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_10_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_10_H -f mk_sb_tbl.awk 8859-10.TXT > $@
|
||||
|
||||
unicode_table_iso8859_11.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_11_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_11_H -f mk_sb_tbl.awk 8859-11.TXT > $@
|
||||
|
||||
unicode_table_iso8859_13.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_13_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_13_H -f mk_sb_tbl.awk 8859-13.TXT > $@
|
||||
|
||||
unicode_table_iso8859_14.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_14_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_14_H -f mk_sb_tbl.awk 8859-14.TXT > $@
|
||||
|
||||
unicode_table_iso8859_15.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_15_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLE_ISO8859_15_H -f mk_sb_tbl.awk 8859-15.TXT > $@
|
||||
|
||||
unicode_table_iso8859_16.h: mk_sb_tbl.awk
|
||||
$(AWK) -v TABLE_NAME=iso8859_16_ucs_table \
|
||||
-v IFNDEF_NAME=UNICODE_TABLEISO8859_16_H -f mk_sb_tbl.awk 8859-16.TXT > $@
|
||||
|
||||
unidata: 8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \
|
||||
8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT 8859-13.TXT \
|
||||
8859-14.TXT 8859-15.TXT 8859-16.TXT
|
||||
|
||||
.PHONY: unidata
|
||||
@@ -1,6 +1,6 @@
|
||||
!include ..\rules.mak.bcc32
|
||||
INCLUDES=$(INCLUDES) -I../mbfl
|
||||
OBJS=mbfilter_cp936.obj mbfilter_hz.obj mbfilter_euc_tw.obj mbfilter_big5.obj mbfilter_euc_jp.obj mbfilter_jis.obj mbfilter_iso8859_1.obj mbfilter_iso8859_2.obj mbfilter_cp1252.obj mbfilter_cp1251.obj mbfilter_ascii.obj mbfilter_iso8859_3.obj mbfilter_iso8859_4.obj mbfilter_iso8859_5.obj mbfilter_iso8859_6.obj mbfilter_iso8859_7.obj mbfilter_iso8859_8.obj mbfilter_iso8859_9.obj mbfilter_iso8859_10.obj mbfilter_iso8859_13.obj mbfilter_iso8859_14.obj mbfilter_iso8859_15.obj mbfilter_htmlent.obj mbfilter_byte2.obj mbfilter_byte4.obj mbfilter_uuencode.obj mbfilter_base64.obj mbfilter_sjis.obj mbfilter_7bit.obj mbfilter_qprint.obj mbfilter_ucs4.obj mbfilter_ucs2.obj mbfilter_utf32.obj mbfilter_utf16.obj mbfilter_utf8.obj mbfilter_utf7.obj mbfilter_utf7imap.obj mbfilter_euc_jp_win.obj mbfilter_cp932.obj mbfilter_euc_cn.obj mbfilter_euc_kr.obj mbfilter_uhc.obj mbfilter_iso2022_kr.obj mbfilter_cp866.obj mbfilter_koi8r.obj html_entities.obj
|
||||
OBJS=mbfilter_cp936.obj mbfilter_hz.obj mbfilter_euc_tw.obj mbfilter_big5.obj mbfilter_euc_jp.obj mbfilter_jis.obj mbfilter_iso8859_1.obj mbfilter_iso8859_2.obj mbfilter_cp1252.obj mbfilter_cp1251.obj mbfilter_ascii.obj mbfilter_iso8859_3.obj mbfilter_iso8859_4.obj mbfilter_iso8859_5.obj mbfilter_iso8859_6.obj mbfilter_iso8859_7.obj mbfilter_iso8859_8.obj mbfilter_iso8859_9.obj mbfilter_iso8859_10.obj mbfilter_iso8859_13.obj mbfilter_iso8859_14.obj mbfilter_iso8859_15.obj mbfilter_iso8859_16.obj mbfilter_htmlent.obj mbfilter_byte2.obj mbfilter_byte4.obj mbfilter_uuencode.obj mbfilter_base64.obj mbfilter_sjis.obj mbfilter_7bit.obj mbfilter_qprint.obj mbfilter_ucs4.obj mbfilter_ucs2.obj mbfilter_utf32.obj mbfilter_utf16.obj mbfilter_utf8.obj mbfilter_utf7.obj mbfilter_utf7imap.obj mbfilter_euc_jp_win.obj mbfilter_cp932.obj mbfilter_euc_cn.obj mbfilter_euc_kr.obj mbfilter_uhc.obj mbfilter_iso2022_kr.obj mbfilter_cp866.obj mbfilter_koi8r.obj html_entities.obj
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
#endif
|
||||
|
||||
#include "mbfilter.h"
|
||||
#include <string.h>
|
||||
#include "html_entities.h"
|
||||
|
||||
const mbfl_html_entity mbfl_html_entity_list[] = { /*
|
||||
{"quot", 34}, DO NOT CONVERT THESE AUTOMATICALLY
|
||||
const mbfl_html_entity_entry mbfl_html_entity_list[] = {
|
||||
{"quot", 34},
|
||||
{"amp", 38},
|
||||
{"lt", 60},
|
||||
{"gt", 62}, */
|
||||
{"gt", 62},
|
||||
{"nbsp", 160},
|
||||
{"iexcl", 161},
|
||||
{"cent", 162},
|
||||
@@ -167,6 +167,7 @@ const mbfl_html_entity mbfl_html_entity_list[] = { /*
|
||||
{"Chi", 935},
|
||||
{"Psi", 936},
|
||||
{"Omega", 937},
|
||||
{"alpha", 945},
|
||||
{"beta", 946},
|
||||
{"gamma", 947},
|
||||
{"delta", 948},
|
||||
|
||||
@@ -30,9 +30,12 @@
|
||||
#ifndef MBFL_HTML_ENTITIES_H
|
||||
#define MBFL_HTML_ENTITIES_H
|
||||
|
||||
#include "mbfilter.h"
|
||||
typedef struct _mbfl_html_entity_entry {
|
||||
char * name;
|
||||
int code;
|
||||
} mbfl_html_entity_entry;
|
||||
|
||||
extern mbfl_html_entity mbfl_html_entity_list[];
|
||||
extern const mbfl_html_entity_entry mbfl_html_entity_list[];
|
||||
|
||||
#endif /* MBFL_HTML_ENTITIES_H */
|
||||
|
||||
@@ -43,7 +43,15 @@
|
||||
#include "mbfilter_htmlent.h"
|
||||
#include "html_entities.h"
|
||||
|
||||
static const unsigned char mblen_table_html[] = { /* 0x00, 0x80 - 0xFF, only valid for numeric entities */
|
||||
static const int htmlentitifieds[256] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
@@ -51,15 +59,7 @@ static const unsigned char mblen_table_html[] = { /* 0x00, 0x80 - 0xFF, only val
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
};
|
||||
|
||||
static const char *mbfl_encoding_html_ent_aliases[] = {"HTML", "html", NULL};
|
||||
@@ -69,7 +69,7 @@ const mbfl_encoding mbfl_encoding_html_ent = {
|
||||
"HTML-ENTITIES",
|
||||
"HTML-ENTITIES",
|
||||
(const char *(*)[])&mbfl_encoding_html_ent_aliases,
|
||||
NULL, /* mblen_table_html, Do not use table instead calulate length based on entities actually used */
|
||||
NULL,
|
||||
MBFL_ENCTYPE_HTML_ENT
|
||||
};
|
||||
|
||||
@@ -98,40 +98,45 @@ const struct mbfl_convert_vtbl vtbl_html_wchar = {
|
||||
*/
|
||||
int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int tmp[10];
|
||||
int i = 0, p = 0, e;
|
||||
int tmp[64];
|
||||
int i;
|
||||
unsigned int uc;
|
||||
const mbfl_html_entity_entry *e;
|
||||
|
||||
if (c<256 && mblen_table_html[c]==1) {
|
||||
if (c < sizeof(htmlentitifieds) / sizeof(htmlentitifieds[0]) &&
|
||||
htmlentitifieds[c] != 1) {
|
||||
CK((*filter->output_function)(c, filter->data));
|
||||
} else {
|
||||
/*php_error_docref("ref.mbstring" TSRMLS_CC, E_NOTICE, "mbfl_filt_conv_html_enc(0x%08X = %d)", c, c);*/
|
||||
CK((*filter->output_function)('&', filter->data));
|
||||
while (1) {
|
||||
e = mbfl_html_entity_list[i].code;
|
||||
if (c < e || e == -1) {
|
||||
break;
|
||||
}
|
||||
if (c == e) {
|
||||
while(mbfl_html_entity_list[i].name[p]) {
|
||||
CK((*filter->output_function)((int)mbfl_html_entity_list[i].name[p++], filter->data));
|
||||
for (i = 0; (e = &mbfl_html_entity_list[i])->name != NULL; i++) {
|
||||
if (c == e->code) {
|
||||
char *p;
|
||||
|
||||
for (p = e->name; *p != '\0'; p++) {
|
||||
CK((*filter->output_function)((int)*p, filter->data));
|
||||
}
|
||||
break;
|
||||
goto last;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i=0;
|
||||
if (!p) {
|
||||
|
||||
{
|
||||
int *p = tmp + sizeof(tmp) / sizeof(tmp[0]);
|
||||
|
||||
CK((*filter->output_function)('#', filter->data));
|
||||
|
||||
uc = (unsigned int)c;
|
||||
|
||||
*(--p) = '\0';
|
||||
do {
|
||||
tmp[i++] = '0'+uc%10;
|
||||
*(--p) = "0123456789"[uc % 10];
|
||||
uc /= 10;
|
||||
} while (uc);
|
||||
do {
|
||||
CK((*filter->output_function)(tmp[--i], filter->data));
|
||||
} while (i);
|
||||
|
||||
for (; *p != '\0'; p++) {
|
||||
CK((*filter->output_function)(*p, filter->data));
|
||||
}
|
||||
}
|
||||
last:
|
||||
CK((*filter->output_function)(';', filter->data));
|
||||
}
|
||||
return c;
|
||||
@@ -140,7 +145,7 @@ int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter)
|
||||
int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter)
|
||||
{
|
||||
filter->status = 0;
|
||||
filter->cache = 0;
|
||||
filter->opaque = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -153,24 +158,24 @@ static const char html_entity_chars[] = "#0123456789abcdefghijklmnopqrstuvwxyzAB
|
||||
void mbfl_filt_conv_html_dec_ctor(mbfl_convert_filter *filter)
|
||||
{
|
||||
filter->status = 0;
|
||||
filter->cache = (int)mbfl_malloc(html_enc_buffer_size+1);
|
||||
filter->opaque = mbfl_malloc(html_enc_buffer_size+1);
|
||||
}
|
||||
|
||||
void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter)
|
||||
{
|
||||
filter->status = 0;
|
||||
if (filter->cache)
|
||||
if (filter->opaque)
|
||||
{
|
||||
mbfl_free((void*)filter->cache);
|
||||
mbfl_free((void*)filter->opaque);
|
||||
}
|
||||
filter->cache = 0;
|
||||
filter->opaque = NULL;
|
||||
}
|
||||
|
||||
int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int pos, ent = 0;
|
||||
mbfl_html_entity *entity;
|
||||
char *buffer = (char*)filter->cache;
|
||||
mbfl_html_entity_entry *entity;
|
||||
char *buffer = (char*)filter->opaque;
|
||||
|
||||
if (!filter->status) {
|
||||
if (c == '&' ) {
|
||||
@@ -192,7 +197,7 @@ int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter)
|
||||
/*php_error_docref("ref.mbstring" TSRMLS_CC, E_NOTICE, "mbstring decoded '%s'=%d", buffer, ent);*/
|
||||
} else {
|
||||
/* named entity */
|
||||
entity = (mbfl_html_entity *)mbfl_html_entity_list;
|
||||
entity = (mbfl_html_entity_entry *)mbfl_html_entity_list;
|
||||
while (entity->name) {
|
||||
if (!strcmp(buffer+1, entity->name)) {
|
||||
ent = entity->code;
|
||||
@@ -241,7 +246,7 @@ int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter)
|
||||
int status, pos = 0;
|
||||
char *buffer;
|
||||
|
||||
buffer = (char*)filter->cache;
|
||||
buffer = (char*)filter->opaque;
|
||||
status = filter->status;
|
||||
/* flush fragments */
|
||||
while (status--) {
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* "streamable kanji code filter and converter"
|
||||
* Copyright (c) 1998-2002 HappySize, Inc. All rights reserved.
|
||||
*
|
||||
* LICENSE NOTICES
|
||||
*
|
||||
* This file is part of "streamable kanji code filter and converter",
|
||||
* which is distributed under the terms of GNU Lesser General Public
|
||||
* License (version 2) as published by the Free Software Foundation.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with "streamable kanji code filter and converter";
|
||||
* if not, write to the Free Software Foundation, Inc., 59 Temple Place,
|
||||
* Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* The author of this file:
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* The source code included in this files was separated from mbfilter.c
|
||||
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "mbfilter.h"
|
||||
#include "mbfilter_iso8859_16.h"
|
||||
#include "unicode_table_iso8859_16.h"
|
||||
|
||||
static const char *mbfl_encoding_8859_16_aliases[] = {"ISO_8859-16", NULL};
|
||||
|
||||
const mbfl_encoding mbfl_encoding_8859_16 = {
|
||||
mbfl_no_encoding_8859_16,
|
||||
"ISO-8859-16",
|
||||
"ISO-8859-16",
|
||||
(const char *(*)[])&mbfl_encoding_8859_16_aliases,
|
||||
NULL,
|
||||
MBFL_ENCTYPE_SBCS
|
||||
};
|
||||
|
||||
const struct mbfl_identify_vtbl vtbl_identify_8859_16 = {
|
||||
mbfl_no_encoding_8859_16,
|
||||
mbfl_filt_ident_common_ctor,
|
||||
mbfl_filt_ident_common_dtor,
|
||||
mbfl_filt_ident_true
|
||||
};
|
||||
|
||||
const struct mbfl_convert_vtbl vtbl_8859_16_wchar = {
|
||||
mbfl_no_encoding_8859_16,
|
||||
mbfl_no_encoding_wchar,
|
||||
mbfl_filt_conv_common_ctor,
|
||||
mbfl_filt_conv_common_dtor,
|
||||
mbfl_filt_conv_8859_16_wchar,
|
||||
mbfl_filt_conv_common_flush
|
||||
};
|
||||
|
||||
const struct mbfl_convert_vtbl vtbl_wchar_8859_16 = {
|
||||
mbfl_no_encoding_wchar,
|
||||
mbfl_no_encoding_8859_16,
|
||||
mbfl_filt_conv_common_ctor,
|
||||
mbfl_filt_conv_common_dtor,
|
||||
mbfl_filt_conv_wchar_8859_16,
|
||||
mbfl_filt_conv_common_flush
|
||||
};
|
||||
|
||||
#define CK(statement) do { if ((statement) < 0) return (-1); } while (0)
|
||||
|
||||
/*
|
||||
* ISO-8859-16 => wchar
|
||||
*/
|
||||
int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int s;
|
||||
|
||||
if (c >= 0 && c < 0xa0) {
|
||||
s = c;
|
||||
} else if (c >= 0xa0 && c < 0x100) {
|
||||
s = iso8859_16_ucs_table[c - 0xa0];
|
||||
if (s <= 0) {
|
||||
s = c;
|
||||
s &= MBFL_WCSPLANE_MASK;
|
||||
s |= MBFL_WCSPLANE_8859_16;
|
||||
}
|
||||
} else {
|
||||
s = c;
|
||||
s &= MBFL_WCSGROUP_MASK;
|
||||
s |= MBFL_WCSGROUP_THROUGH;
|
||||
}
|
||||
|
||||
CK((*filter->output_function)(s, filter->data));
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* wchar => ISO-8859-16
|
||||
*/
|
||||
int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int s, n;
|
||||
|
||||
if (c >= 0 && c < 0xa0) {
|
||||
s = c;
|
||||
} else {
|
||||
s = -1;
|
||||
n = 95;
|
||||
while (n >= 0) {
|
||||
if (c == iso8859_16_ucs_table[n]) {
|
||||
s = 0xa0 + n;
|
||||
break;
|
||||
}
|
||||
n--;
|
||||
}
|
||||
if (s <= 0 && (c & ~MBFL_WCSPLANE_MASK) == MBFL_WCSPLANE_8859_16) {
|
||||
s = c & MBFL_WCSPLANE_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
if (s >= 0) {
|
||||
CK((*filter->output_function)(s, filter->data));
|
||||
} else {
|
||||
if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
|
||||
CK(mbfl_filt_conv_illegal_output(c, filter));
|
||||
}
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* COPYRIGHT NOTICE
|
||||
*
|
||||
* This file is a portion of "streamable kanji code filter and converter"
|
||||
* library, which is distributed under GNU Lesser General Public License
|
||||
* version 2.1.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MBFL_MBFILTER_ISO8859_16_H
|
||||
#define MBFL_MBFILTER_ISO8859_16_H
|
||||
|
||||
#include "mbfilter.h"
|
||||
|
||||
extern const mbfl_encoding mbfl_encoding_8859_16;
|
||||
extern const struct mbfl_identify_vtbl vtbl_identify_8859_16;
|
||||
extern const struct mbfl_convert_vtbl vtbl_8859_16_wchar;
|
||||
extern const struct mbfl_convert_vtbl vtbl_wchar_8859_16;
|
||||
|
||||
int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter);
|
||||
int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter);
|
||||
|
||||
#endif /* MBFL_MBFILTER_ISO8859_16_H */
|
||||
@@ -155,11 +155,30 @@ int mbfl_filt_conv_qprintenc_flush(mbfl_convert_filter *filter)
|
||||
*/
|
||||
int mbfl_filt_conv_qprintdec(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int n;
|
||||
int n, m;
|
||||
|
||||
static int hex2code_map[] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
|
||||
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
||||
};
|
||||
|
||||
switch (filter->status) {
|
||||
case 1:
|
||||
if ((c >= 0x30 && c <= 0x39) || (c >= 0x41 && c <= 0x46)) { /* 0 - 9 or A - F */
|
||||
if (hex2code_map[c & 0xff] >= 0) {
|
||||
filter->cache = c;
|
||||
filter->status = 2;
|
||||
} else if (c == 0x0d) { /* soft line feed */
|
||||
@@ -173,21 +192,13 @@ int mbfl_filt_conv_qprintdec(int c, mbfl_convert_filter *filter)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
n = filter->cache;
|
||||
if (n >= 0x30 && n <= 0x39) { /* '0' - '9' */
|
||||
n -= 48; /* 48 = '0' */
|
||||
} else {
|
||||
n -= 55; /* 55 = 'A' - 10 */
|
||||
}
|
||||
n <<= 4;
|
||||
if (c >= 0x30 && c <= 0x39) { /* '0' - '9' */
|
||||
n += (c - 48);
|
||||
} else if (c >= 0x41 && c <= 0x46) { /* 'A' - 'F' */
|
||||
n += (c - 55);
|
||||
} else {
|
||||
m = hex2code_map[c & 0xff];
|
||||
if (m < 0) {
|
||||
CK((*filter->output_function)(0x3d, filter->data)); /* '=' */
|
||||
CK((*filter->output_function)(filter->cache, filter->data));
|
||||
n = c;
|
||||
} else {
|
||||
n = hex2code_map[filter->cache] << 4 | m;
|
||||
}
|
||||
CK((*filter->output_function)(n, filter->data));
|
||||
filter->status = 0;
|
||||
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/awk -f
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Description: a script that generates a single byte code set to Unicode
|
||||
# mapping table.
|
||||
#
|
||||
|
||||
function conv(str) {
|
||||
if (!match(str, "^0[xX]")) {
|
||||
return 0 + str
|
||||
}
|
||||
|
||||
retval = 0
|
||||
|
||||
for (i = 3; i <= length(str); i++) {
|
||||
n = index("0123456789abcdefABCDEF", substr(str, i, 1)) - 1
|
||||
|
||||
if (n < 0) {
|
||||
return 0 + str;
|
||||
} else if (n >= 16) {
|
||||
n -= 6;
|
||||
}
|
||||
|
||||
retval = retval * 16 + n
|
||||
}
|
||||
|
||||
return retval
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
FS="[ \t#]"
|
||||
}
|
||||
|
||||
/^#/ {
|
||||
# Do nothing
|
||||
}
|
||||
|
||||
{
|
||||
tbl[conv($1)] = conv($2)
|
||||
}
|
||||
|
||||
END {
|
||||
print "/* This file is automatically generated. Do not edit! */"
|
||||
if (IFNDEF_NAME) {
|
||||
print "#ifndef " IFNDEF_NAME
|
||||
}
|
||||
|
||||
print "static const int " TABLE_NAME "[] = {"
|
||||
i = 160;
|
||||
for (;;) {
|
||||
printf("\t0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x", tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++]);
|
||||
if (i != 256) {
|
||||
printf(",\n");
|
||||
} else {
|
||||
print ""
|
||||
break;
|
||||
}
|
||||
}
|
||||
print "};"
|
||||
|
||||
if (IFNDEF_NAME) {
|
||||
print "#endif /* " IFNDEF_NAME " */"
|
||||
}
|
||||
}
|
||||
Loaded 100 of 399 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user