mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-08 09:47:30 +00:00
Compare commits
513
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7203320201 | ||
|
|
27176de818 | ||
|
|
5245a0dc9e | ||
|
|
0cb9d15e73 | ||
|
|
4a1ca49acb | ||
|
|
2dd9fdfd85 | ||
|
|
85db415f29 | ||
|
|
e22cec443e | ||
|
|
7a6418cad2 | ||
|
|
cc7433870c | ||
|
|
0151cb75cf | ||
|
|
80756295f6 | ||
|
|
3131aafe57 | ||
|
|
ca9cfc7525 | ||
|
|
e12aaa6d09 | ||
|
|
e60f1d01b0 | ||
|
|
f2400ce576 | ||
|
|
b9b6338d5e | ||
|
|
b251c34bc0 | ||
|
|
22122649f4 | ||
|
|
b2f263a5ee | ||
|
|
8cb45d3f37 | ||
|
|
e4cf66c00a | ||
|
|
3dc2d1e958 | ||
|
|
ec4594ed4b | ||
|
|
d1f35cd2a3 | ||
|
|
ab15fed03d | ||
|
|
638471d549 | ||
|
|
c0f896f1f6 | ||
|
|
cea2f49da8 | ||
|
|
b1a629c370 | ||
|
|
2c1f9fc486 | ||
|
|
f66dc118eb | ||
|
|
eb53114d5e | ||
|
|
d518d02384 | ||
|
|
380f1a7943 | ||
|
|
8940b0ad3c | ||
|
|
c7fee7b851 | ||
|
|
6b9440661f | ||
|
|
0aa551f125 | ||
|
|
303da734d9 | ||
|
|
474dcb486e | ||
|
|
90609154cc | ||
|
|
bbd3f25d23 | ||
|
|
5e56f05afa | ||
|
|
1ba9d5eea0 | ||
|
|
a8a233102e | ||
|
|
139316bfa8 | ||
|
|
c303e2c9f6 | ||
|
|
fb599af3ed | ||
|
|
dd81f500c7 | ||
|
|
416fcc197e | ||
|
|
c17c4e6344 | ||
|
|
71e7ee097f | ||
|
|
273a2bf38a | ||
|
|
48880dc48b | ||
|
|
725aa965af | ||
|
|
d7ae4db7fe | ||
|
|
3deb7d765c | ||
|
|
ed4a0fb2be | ||
|
|
333e94c183 | ||
|
|
52bd0e67c4 | ||
|
|
86dc20c4b8 | ||
|
|
4083feba29 | ||
|
|
26d7374ce0 | ||
|
|
45c5d641ca | ||
|
|
32e538969e | ||
|
|
3ac117a19b | ||
|
|
3c97c82ee7 | ||
|
|
507cc75d92 | ||
|
|
04e94d6f30 | ||
|
|
9350e18e55 | ||
|
|
973312e1c5 | ||
|
|
dd920328ee | ||
|
|
d98ac26bfd | ||
|
|
19d3cf09f6 | ||
|
|
ad43336c68 | ||
|
|
f12fcf4384 | ||
|
|
bdae3ed4a4 | ||
|
|
31660f3c61 | ||
|
|
f1790b8616 | ||
|
|
137c2c02d9 | ||
|
|
760e82dd0a | ||
|
|
fda52535e1 | ||
|
|
7e9d022dfd | ||
|
|
fc2d7434d6 | ||
|
|
19a8ef214e | ||
|
|
a852f13e62 | ||
|
|
28a8a70970 | ||
|
|
d06b046e86 | ||
|
|
a713a88392 | ||
|
|
10e8ca4b3b | ||
|
|
02dafdc9b0 | ||
|
|
154fe2b566 | ||
|
|
261c2ac79a | ||
|
|
a5c8d3aef2 | ||
|
|
7b475f7004 | ||
|
|
3ba2d54217 | ||
|
|
c07f85ceb4 | ||
|
|
df15a2e57e | ||
|
|
b5d1bf2a67 | ||
|
|
82dfeee01d | ||
|
|
f0b94e8796 | ||
|
|
490894cb44 | ||
|
|
5f25ab414f | ||
|
|
343c47e24b | ||
|
|
27c282d34a | ||
|
|
4d99f3e4e3 | ||
|
|
4e0b6d1e15 | ||
|
|
154b12f2b5 | ||
|
|
02d7a70809 | ||
|
|
7780655d38 | ||
|
|
12063cbf71 | ||
|
|
1586c176f6 | ||
|
|
3cdcc6a201 | ||
|
|
5f6e25342f | ||
|
|
38155bfcb2 | ||
|
|
6793119e36 | ||
|
|
d52283eef8 | ||
|
|
60cf7403e0 | ||
|
|
7c9479388f | ||
|
|
1ac7b33e48 | ||
|
|
2bfd9402b1 | ||
|
|
ae430bfba8 | ||
|
|
765ebf8eee | ||
|
|
dadaee4171 | ||
|
|
dfa9fab613 | ||
|
|
64d489900a | ||
|
|
0a65579c76 | ||
|
|
4279002766 | ||
|
|
34c3cfa849 | ||
|
|
e5610b3b47 | ||
|
|
b891ee9361 | ||
|
|
cac83f87a0 | ||
|
|
13dcb49db5 | ||
|
|
468a3c4f56 | ||
|
|
d94ae09341 | ||
|
|
f585c6ce18 | ||
|
|
2af4859c3f | ||
|
|
17cd2e4cf8 | ||
|
|
cbdca16521 | ||
|
|
76e641e8b7 | ||
|
|
322ce93714 | ||
|
|
e6522b68e9 | ||
|
|
e5bb3f348e | ||
|
|
782fb51ad7 | ||
|
|
3e05989a83 | ||
|
|
336ca133d3 | ||
|
|
7b04ffa0c5 | ||
|
|
30f0b61415 | ||
|
|
a3b0f8e645 | ||
|
|
252d12ce1c | ||
|
|
adc45bc653 | ||
|
|
ec51555630 | ||
|
|
e5f1bf0f83 | ||
|
|
9b087754d1 | ||
|
|
6c50fdabdf | ||
|
|
4fba6307c0 | ||
|
|
cbcb6e1936 | ||
|
|
4885bd6361 | ||
|
|
834a71b67e | ||
|
|
a4a777fd97 | ||
|
|
fb8a88da3d | ||
|
|
f2dac4a25a | ||
|
|
d033a0c3fd | ||
|
|
fef95081c1 | ||
|
|
b33b5991e1 | ||
|
|
641db909ff | ||
|
|
62210bef1d | ||
|
|
4cf414e0e1 | ||
|
|
d3bc482bf4 | ||
|
|
32511e9c55 | ||
|
|
11b294c74d | ||
|
|
c66a9fdc22 | ||
|
|
e615a0d3cf | ||
|
|
ffb9c99cfc | ||
|
|
974913cf23 | ||
|
|
23534f667d | ||
|
|
0f9cf6eb18 | ||
|
|
769f1a8564 | ||
|
|
4b064814e5 | ||
|
|
fb1b7c9060 | ||
|
|
f39b4a8582 | ||
|
|
06ceb7da90 | ||
|
|
934b4388cb | ||
|
|
055710e95a | ||
|
|
12e6c6d95f | ||
|
|
cd11446263 | ||
|
|
844c90a395 | ||
|
|
f9ee6d3d9e | ||
|
|
2d73699721 | ||
|
|
4caca1d6eb | ||
|
|
64595cc959 | ||
|
|
fb49473192 | ||
|
|
5c6ec3c7bf | ||
|
|
a86833cc06 | ||
|
|
dc1ff44e37 | ||
|
|
ed235cf8b7 | ||
|
|
adb0cb5c01 | ||
|
|
964d412062 | ||
|
|
3cb5d4790a | ||
|
|
a6faca14b7 | ||
|
|
4bbf5a04ed | ||
|
|
99a15a90c7 | ||
|
|
b7e1d6a196 | ||
|
|
7d884d8e7b | ||
|
|
106d6a77ce | ||
|
|
d10a337f00 | ||
|
|
43b21ea95f | ||
|
|
42bb3ed035 | ||
|
|
e88d05b9a5 | ||
|
|
5771743122 | ||
|
|
dbe6bdca91 | ||
|
|
ed101fb57d | ||
|
|
d689414621 | ||
|
|
05729165c3 | ||
|
|
192c93ce8e | ||
|
|
1fbcdd2102 | ||
|
|
474aa9fbdf | ||
|
|
37fb4ddb51 | ||
|
|
242cb5ca83 | ||
|
|
f9f1414172 | ||
|
|
4f005f63d5 | ||
|
|
53584a7dfd | ||
|
|
1784f408bc | ||
|
|
811b353f22 | ||
|
|
a94cc66d1c | ||
|
|
c5f264a8e0 | ||
|
|
e78a9cc5d7 | ||
|
|
eb9ce1f481 | ||
|
|
c0c2b6916e | ||
|
|
57edb51964 | ||
|
|
3d1401d458 | ||
|
|
bd7cb92852 | ||
|
|
18e00ac0a3 | ||
|
|
1bc1289953 | ||
|
|
6adaa2c394 | ||
|
|
ac1f6d72cd | ||
|
|
fe130827b6 | ||
|
|
c43d9ad351 | ||
|
|
568e301e46 | ||
|
|
a47cc80ad9 | ||
|
|
3f12d0f2e7 | ||
|
|
aa431db411 | ||
|
|
f36bc79e87 | ||
|
|
e763001682 | ||
|
|
53da694542 | ||
|
|
3af0eb20a0 | ||
|
|
5c46b61769 | ||
|
|
0752ba8bc9 | ||
|
|
c5790584df | ||
|
|
bc015f22c9 | ||
|
|
f02b9373c0 | ||
|
|
c2ed94ed04 | ||
|
|
86d9796c17 | ||
|
|
21c10baabc | ||
|
|
00f74e44b3 | ||
|
|
43ae28411d | ||
|
|
a69c752d39 | ||
|
|
72cee8e34f | ||
|
|
62a7f935b8 | ||
|
|
be955c576f | ||
|
|
691a5a5314 | ||
|
|
30291f81e3 | ||
|
|
72c4458108 | ||
|
|
71f5acedf9 | ||
|
|
86cb47ea9c | ||
|
|
544a3a93a9 | ||
|
|
d126bace5f | ||
|
|
f5e96952d8 | ||
|
|
eb1ef0b37b | ||
|
|
56b6d7b555 | ||
|
|
dd9ab596d2 | ||
|
|
83f57e0381 | ||
|
|
3fe419e7a2 | ||
|
|
f334499cec | ||
|
|
ed253b36ee | ||
|
|
bb41e69096 | ||
|
|
f193a2ca40 | ||
|
|
a67ba9a314 | ||
|
|
34b94f143e | ||
|
|
23390048f0 | ||
|
|
4d518b1a2e | ||
|
|
41806af161 | ||
|
|
b71a29c587 | ||
|
|
fb9c8f841f | ||
|
|
1d03836951 | ||
|
|
bec22b1ce4 | ||
|
|
dd1cedd5ca | ||
|
|
9c999b3d71 | ||
|
|
1bb515dc2c | ||
|
|
d89eed693b | ||
|
|
fa002563bc | ||
|
|
b605fd9ec6 | ||
|
|
3d77a3087c | ||
|
|
d7f9043378 | ||
|
|
e4c4689c3e | ||
|
|
783a4a7d74 | ||
|
|
2a6153f007 | ||
|
|
9f3f7701f8 | ||
|
|
e70afa0c54 | ||
|
|
c213d9392c | ||
|
|
5985d044b1 | ||
|
|
9905ed2b05 | ||
|
|
0b81ec337c | ||
|
|
e0fb69cfc4 | ||
|
|
58b07a4f2c | ||
|
|
0ed61df9d5 | ||
|
|
de9cf6516f | ||
|
|
24440f1df2 | ||
|
|
fd4fb6bddc | ||
|
|
3bfd4173a2 | ||
|
|
8dc6530c67 | ||
|
|
a032a7e82a | ||
|
|
f44cd6f30e | ||
|
|
3dcb8f933f | ||
|
|
5d2bb8b8d5 | ||
|
|
2721e6afa7 | ||
|
|
77b892c26e | ||
|
|
b89c43519a | ||
|
|
54175c5fe6 | ||
|
|
3df45d6dd8 | ||
|
|
453d7c8e4d | ||
|
|
c959af2365 | ||
|
|
827b7998f9 | ||
|
|
819a2fc1fd | ||
|
|
605682b3c8 | ||
|
|
44a43188a6 | ||
|
|
452e8a0660 | ||
|
|
b5e60437a0 | ||
|
|
be71676a11 | ||
|
|
2ea4681ff1 | ||
|
|
76cde0e16e | ||
|
|
8a06e8c6c7 | ||
|
|
09d7728c0a | ||
|
|
618fe005e6 | ||
|
|
205b621002 | ||
|
|
b866eac68f | ||
|
|
9c65107094 | ||
|
|
d3b47d4b2c | ||
|
|
f1d78e3ef5 | ||
|
|
b1cf064c35 | ||
|
|
590f13da18 | ||
|
|
a30a24dc0b | ||
|
|
d1ded86a63 | ||
|
|
205c2235fa | ||
|
|
0e1a181b47 | ||
|
|
5a673f727c | ||
|
|
32562cac4e | ||
|
|
79100113a7 | ||
|
|
1491b7a07d | ||
|
|
28b6e435bf | ||
|
|
3eec585f05 | ||
|
|
ea0d37a507 | ||
|
|
4f2d14d7da | ||
|
|
14a77654c1 | ||
|
|
254485dbea | ||
|
|
bd30c3c17c | ||
|
|
e4f620f894 | ||
|
|
f096c0ca6f | ||
|
|
fad7db9695 | ||
|
|
aa6046f941 | ||
|
|
401f3711f6 | ||
|
|
e672133aa8 | ||
|
|
c1a5d08fe1 | ||
|
|
20c3de56d5 | ||
|
|
f8113293d3 | ||
|
|
f4166f11e9 | ||
|
|
7f4ff662fe | ||
|
|
37461bd51f | ||
|
|
653273f34f | ||
|
|
361b97226e | ||
|
|
96a9a83f15 | ||
|
|
c622d74952 | ||
|
|
496133babd | ||
|
|
2c7866cf8b | ||
|
|
e00cf495f7 | ||
|
|
c10647f7f0 | ||
|
|
cac350dc27 | ||
|
|
83fa61ef7b | ||
|
|
8fbfb292d0 | ||
|
|
3e13ac26e9 | ||
|
|
8aa98687fa | ||
|
|
131f5cfce2 | ||
|
|
3f9001850e | ||
|
|
4462ee40ec | ||
|
|
eb13b12855 | ||
|
|
1206b0c1e7 | ||
|
|
9e14a25a81 | ||
|
|
ce1bd6d110 | ||
|
|
8c5a1a03db | ||
|
|
0d10b7dead | ||
|
|
231b8e147f | ||
|
|
000eaf4a5a | ||
|
|
20d1c8d5d0 | ||
|
|
ec92b77e22 | ||
|
|
408a8dfead | ||
|
|
9080907ed7 | ||
|
|
3757566d4f | ||
|
|
8b4e565285 | ||
|
|
6277583f69 | ||
|
|
beb3b6b44a | ||
|
|
8b416f0334 | ||
|
|
9d277028e5 | ||
|
|
2b411094db | ||
|
|
a618edb5dd | ||
|
|
5064f0781f | ||
|
|
7ed66b20e5 | ||
|
|
910cb1be81 | ||
|
|
9a78224278 | ||
|
|
718a1eb400 | ||
|
|
c325305a7c | ||
|
|
3c612c6432 | ||
|
|
abd6206fee | ||
|
|
016b308031 | ||
|
|
de30eedb5e | ||
|
|
fe8b66a4fe | ||
|
|
5819639209 | ||
|
|
5ba7dbb89f | ||
|
|
edd5bf9267 | ||
|
|
e3f5063ec2 | ||
|
|
3e348ed92f | ||
|
|
8a0805cd3a | ||
|
|
8a7354d1fd | ||
|
|
9d5d693cf6 | ||
|
|
c808eacefb | ||
|
|
454666e36c | ||
|
|
a0ab5d239e | ||
|
|
5b2f73c7ac | ||
|
|
324eb12388 | ||
|
|
ca6c23c5db | ||
|
|
e5876039bb | ||
|
|
d8a09a7c5b | ||
|
|
4edfec2b6c | ||
|
|
4756d3234b | ||
|
|
29b19d979f | ||
|
|
529a68d134 | ||
|
|
8251af93d9 | ||
|
|
730634bbb4 | ||
|
|
b8ef38a0e2 | ||
|
|
58c70caf41 | ||
|
|
85ca6a5fb7 | ||
|
|
f07d389ef2 | ||
|
|
c3a9018ac4 | ||
|
|
72ff5105ef | ||
|
|
1fd19dc38d | ||
|
|
911042faeb | ||
|
|
9ecbb3cfd1 | ||
|
|
fc7bb77cd5 | ||
|
|
5336747ece | ||
|
|
7662c57e57 | ||
|
|
474f6007e2 | ||
|
|
ea25cdd7b7 | ||
|
|
4d65bfe327 | ||
|
|
e2ecf549e1 | ||
|
|
8daa261b97 | ||
|
|
5065f8bcb8 | ||
|
|
6fa911f091 | ||
|
|
6ac350d1b8 | ||
|
|
c998e8137e | ||
|
|
c104474c3c | ||
|
|
0555ad1f5d | ||
|
|
2671926476 | ||
|
|
30d72b04b5 | ||
|
|
663b247700 | ||
|
|
f2135637e9 | ||
|
|
4f8ae68563 | ||
|
|
5933b60dc0 | ||
|
|
05e13601c9 | ||
|
|
af5e1c0364 | ||
|
|
0b1db2afae | ||
|
|
30c35d4330 | ||
|
|
61aa311e62 | ||
|
|
8a010b513e | ||
|
|
29b1a4e97d | ||
|
|
e57cb388e2 | ||
|
|
fa742989b5 | ||
|
|
72f7116854 | ||
|
|
8c5aad339d | ||
|
|
6cd5cc0fa0 | ||
|
|
33f08d0231 | ||
|
|
20120ecff3 | ||
|
|
53b34e0e34 | ||
|
|
4ac3fdc8d9 | ||
|
|
9363eaae3d | ||
|
|
1c1401787a | ||
|
|
902167c255 | ||
|
|
12cb33af5d | ||
|
|
a810e44570 | ||
|
|
8ec3b47402 | ||
|
|
f893cc65e1 | ||
|
|
98e8dede11 | ||
|
|
c87a849a3e | ||
|
|
3d343076ee | ||
|
|
86733d3b4f | ||
|
|
1b7d024e5c | ||
|
|
cfafb32049 | ||
|
|
c68550c45d | ||
|
|
74d82d0cb7 | ||
|
|
4e98e2d832 | ||
|
|
0d03789fb9 | ||
|
|
a8677aafbc | ||
|
|
4f9949dc2a | ||
|
|
05d1e6d88f | ||
|
|
5fcc8ca854 | ||
|
|
760add1c63 | ||
|
|
35d8b9408e | ||
|
|
e1e8ee1924 | ||
|
|
15c658f21f | ||
|
|
58269f1769 | ||
|
|
b736409e52 | ||
|
|
dd955a3b41 | ||
|
|
c5c68f4d36 |
No files matched your search
+3
-13
@@ -60,19 +60,9 @@ Exceptions:
|
||||
check its man page again, and only then, consider using it, and even then,
|
||||
try avoiding it.
|
||||
|
||||
[7] Use ZEND_* macros instead of PHP_* macros. Use of PHP_* macros is not
|
||||
recommended. Since most of the PHP_* macros are ZEND_* macro aliases, using
|
||||
the PHP_* macros makes browsing the source code with a tag search harder.
|
||||
|
||||
[8] Use assert(). assert.h is included in php.h if it is available. Not only
|
||||
does good assertion catch bugs, but it also helps with code readability.
|
||||
- Do not use assert for error handling. Use assert only for the
|
||||
condition that must be always true.
|
||||
- Do not use assignments in assert conditions. If you assign inside an
|
||||
assert condition, you risk an elusive bug that would be very difficult
|
||||
to spot in a debug build, due to the side effect of the assignment.
|
||||
Function calls in assert conditions may also cause this problem, if
|
||||
they modify one of their arguments or global variables.
|
||||
[7] Use ZEND_* macro instead of PHP_* macro. Use of PHP_* macros are
|
||||
not recommended. Since most of PHP_* macros are ZEND_* macro alias, use of
|
||||
PHP_* macro makes browsing source with tag search harder.
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
For the list of people who've put work into PHP, please see
|
||||
For the list of people who've put work into PHP 4.0, please see
|
||||
http://www.php.net/credits.php
|
||||
-10
@@ -36,11 +36,6 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
@@ -221,11 +216,6 @@ MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ctype
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: curl
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.0a1
|
||||
The PHP License, version 3.0
|
||||
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
@@ -8,34 +8,38 @@ modification, is permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior permission from the
|
||||
PHP Group. This does not apply to add-on libraries or tools
|
||||
that work in conjunction with PHP. In such a case the PHP
|
||||
name may be used to indicate that the product supports PHP.
|
||||
3. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact group@php.net.
|
||||
|
||||
4. Products derived from this software may not be called "PHP", nor
|
||||
may "PHP" appear in their name, without prior written permission
|
||||
from group@php.net. You may indicate that your software works in
|
||||
conjunction with PHP by saying "Foo for PHP" instead of calling
|
||||
it "PHP Foo" or "phpfoo"
|
||||
|
||||
4. The PHP Group may publish revised and/or new versions of the
|
||||
5. The PHP Group may publish revised and/or new versions of the
|
||||
license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
Once covered code has been published under a particular version
|
||||
of the license, you may always continue to use it under the
|
||||
terms of that version. You may also choose to use such covered
|
||||
code under the terms of any subsequent version of the license
|
||||
of the license, you may always continue to use it under the terms
|
||||
of that version. You may also choose to use such covered code
|
||||
under the terms of any subsequent version of the license
|
||||
published by the PHP Group. No one other than the PHP Group has
|
||||
the right to modify the terms applicable to covered code created
|
||||
under this License.
|
||||
|
||||
5. Redistributions of any form whatsoever must retain the following
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes PHP, freely available from
|
||||
http://www.php.net/".
|
||||
<http://www.php.net/>".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
|
||||
|
||||
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
|
||||
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
|
||||
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
|
||||
|
||||
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
|
||||
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
|
||||
|
||||
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
|
||||
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
|
||||
@@ -1,72 +0,0 @@
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
|
||||
|
||||
|
||||
all: $(all_targets)
|
||||
|
||||
build-modules: $(PHP_MODULES)
|
||||
|
||||
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
|
||||
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
|
||||
|
||||
php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
|
||||
sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
|
||||
install: $(install_targets)
|
||||
|
||||
|
||||
install-cli: sapi/cli/php
|
||||
$(INSTALL_CLI)
|
||||
|
||||
install-sapi: libphp4.la
|
||||
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
$(INSTALL_IT)
|
||||
|
||||
install-modules:
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
|
||||
echo "installing shared modules into $(EXTENSION_DIR)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
|
||||
|
||||
install-tester:
|
||||
@echo "Installing regression tester"
|
||||
@$(mkinstalldirs) $(PEAR_INSTALLDIR)
|
||||
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
||||
|
||||
install-su: install-pear install-tester
|
||||
|
||||
test: sapi/cli/php
|
||||
@TEST_PHP_EXECUTABLE=$(top_builddir)/sapi/cli/php \
|
||||
$(top_builddir)/sapi/cli/php -c php.ini-dist $(top_srcdir)/run-tests.php
|
||||
|
||||
clean:
|
||||
find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp4.la php sapi/cli/php modules/* libs/*
|
||||
|
||||
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
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
.NOEXPORT:
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
|
||||
ZEND_DIR = $(srcdir)/Zend
|
||||
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) $(CLI_DIR) . $(PEAR_DIR)
|
||||
|
||||
LTLIBRARY_NAME = libphp4.la
|
||||
LTLIBRARY_SOURCES = stub.c
|
||||
|
||||
LTLIBRARY_DEPENDENCIES = \
|
||||
Zend/libZend.la \
|
||||
sapi/$(PHP_SAPI)/libsapi.la \
|
||||
main/libmain.la \
|
||||
$(REGEX_LIB) \
|
||||
$(EXT_LTLIBS) \
|
||||
$(TSRM_LIB)
|
||||
|
||||
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
|
||||
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS)
|
||||
|
||||
PROGRAM_NAME = php
|
||||
PROGRAM_SOURCES = stub.c
|
||||
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
|
||||
PROGRAM_LDFLAGS = -export-dynamic
|
||||
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
|
||||
|
||||
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
|
||||
|
||||
install_targets = install-sapi install-modules
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
include $(top_srcdir)/build/library.mk
|
||||
include $(top_srcdir)/build/program.mk
|
||||
|
||||
install-sapi:
|
||||
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
$(INSTALL_IT)
|
||||
|
||||
install-modules:
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(moduledir) && \
|
||||
echo "installing shared modules into $(moduledir)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(INSTALL_ROOT)$(moduledir) >/dev/null 2>&1 || true
|
||||
|
||||
install-tester:
|
||||
@echo "Installing regression tester"
|
||||
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
||||
@$(INSTALL) -m 755 $(srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
||||
|
||||
install-pear: install-modules
|
||||
(cd pear && $(MAKE) install)
|
||||
|
||||
install-su: install-pear install-tester
|
||||
|
||||
clean-modules:
|
||||
rm -f modules/*
|
||||
|
||||
.NOEXPORT:
|
||||
@@ -1,127 +1,42 @@
|
||||
PHP 4 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2002, Version 4.3.0
|
||||
- Added preliminary SAX-Input support. It's now possible to build a DomDocument
|
||||
with SAX-Events (added domxml_parser_start_document(), domxml_parser_end_document(),
|
||||
domxml_parser_start_element(tagname[,attributes]), domxml_parser_end_element(tagname),
|
||||
domxml_parser_characters(characters), domxml_parser_cdata_block(cdata),
|
||||
domxml_parser_comment(comment), domxml_parser_get_document(). (chregu)
|
||||
- Bundle gd library 2.0.1 with php (ext/gd/libgd) (Rasmus), tweak config.m4 to
|
||||
work with it (Jani), smallers tweaks for Win32 (Markus, Edin)
|
||||
- Fixed bug with Apache which let PHP_AUTH_* variables to be set when
|
||||
external basic auth mechanism was used. (Jani)
|
||||
- Fixed bzopen() crash in thread-safe mode. (Andrei)
|
||||
- Added better error-messages (3rd parameter) and validating of DTDs (2nd
|
||||
parameter) to domxml_open_mem() and domxml_open_file(). (Christian)
|
||||
- Added domxml_doc_validate() for validating existing DomDocuments with a DTD.
|
||||
(Christian)
|
||||
- Added ability to capture string offsets in preg_match_*() results.
|
||||
(David Brown, Andrei)
|
||||
- Fixed set_error_handler() to accept methods as callbacks and also report
|
||||
invalid callbacks. (Andrei)
|
||||
- Fixed a memory corruption bug in overload extension. (Andrei)
|
||||
- Fixed error handling in fsockopen() on win32. (Jason)
|
||||
- Added win32 support for the timeout parameter of fsockopen(). (Jason)
|
||||
- Fixed shuffle() to provide equal distribution of values. (Andrei)
|
||||
- Added --with-mysql-sock configure option which can be used to override
|
||||
the unix socket location. (e.g. NFS compiles, etc.) (James Cox)
|
||||
- Fixed is_a() to properly work on extension registered classes. (Andrei)
|
||||
- Added new constants: PHP_PREFIX and PHP_SHLIB_SUFFIX. (Stig)
|
||||
- Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
|
||||
streams to their respective I/O counterparts. (Edin)
|
||||
- Added pctnl_alarm() function. (Edin)
|
||||
06 Sep 2002, Version 4.2.3
|
||||
- Enabled strcoll() on win32. (Markus)
|
||||
- Fixed possible ASCII control char injection in mail(). (Stefan Esser)
|
||||
- Fixed a potential crash bug in import_request_variables() (Zeev)
|
||||
- Fixed several problems with directory functions on Windows. (Steph)
|
||||
- Fixed xbithack bug in Apache module. (Rasmus)
|
||||
- Fixed a bug that prevented touch() from working on various platforms. (Steph)
|
||||
- Fixed ob_gzhandler()'s handling of requests that do have the Accept-Encoding
|
||||
header, but do not allow compression. (Zeev)
|
||||
- Fixed several bugs in the multithreaded version that could cause random parse
|
||||
errors, especially on machines with multiple CPUs. (Zeev, Zend Engine)
|
||||
- Fixed a build problem in bcmath. (Alan)
|
||||
- Fixed several bzip2 issues. (Andrei, kalowsky)
|
||||
- Fixed several COM issues. (Harald)
|
||||
- Various exif fixes. (Marcus)
|
||||
- Fixed domxml_xslt_process() and domxml_get_element_by_id() and several
|
||||
other issues in DOMXML. (Christian)
|
||||
- Fixed DOMXML crash on removing previously created attributes. (Christian)
|
||||
- Fixed crash when converting $GLOBALS to an object. (Zeev, Zend Engine)
|
||||
- Fixed ImageCreateFromGD2Part() (Jani)
|
||||
- Fixed a build issue in the IMAP extension under IRIX. (kalowsky)
|
||||
- Fixed a bug in imap_last_error() (Jani)
|
||||
- Various mbstring fixes. (Yasuo, Rui)
|
||||
- Fixed a build problem in the mcal extension. (Jani)
|
||||
- Made MySQL rollback open transactions when the request ends. (Georg)
|
||||
- Fixed a crash in the shutdown order of the ODBC module. (kalowsky)
|
||||
- Fixed PCRE build problems. (troels@arvin.dk)
|
||||
- Fixed a crash in pg_lo_write() (Yasuo)
|
||||
- Fixed posix_isatty() and posix_ttyname(). (Markus)
|
||||
- Fixed accidental pg_lo_import() API change. (Yasuo)
|
||||
- Fixed ereg_replace() crash when the backreference number was greater than the
|
||||
number of captured subpatterns. (oliver@billix.franken.de)
|
||||
- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
|
||||
- If zlib.output_compression is enabled and a page is compressed
|
||||
a "Vary: Accept-Encoding" header is added. (Stefan)
|
||||
- Renamed getallheaders() to apache_request_headers() and kept getallheaders()
|
||||
as an alias to it. Also added apache_response_headers() which returns the
|
||||
current response headers from Apache. (Rasmus)
|
||||
- Added missing AddRef() calls in the COM extension. This should fix weird
|
||||
behaviour (in particular with ADODB). (Harald)
|
||||
- Fixed some dummy errors. (dets)
|
||||
- Fix segfault in version_compare(). (Stig)
|
||||
- Added compressed Flash MX files support to getimagesize(). (Derick)
|
||||
- Added ability to capture string offsets in preg_split() results.
|
||||
(David Brown, Andrei)
|
||||
- Fixed a crash bug in token_get_all(). (Andrei)
|
||||
- Implemented glob() for Unix/Win32. (Hartmut, Edin, Markus)
|
||||
- Added domxml_doc_set_root() to change the root node. (Lukas Schroeder)
|
||||
- Fixed a crash bug in stripslashes() when working in sybase mode. (Rasmus)
|
||||
- Added experimental support for Simplified Chinese, Traditional Chinese and
|
||||
Korean encodings into mbstring. (Rui)
|
||||
- Misc. Win32 mail() enhancements: support 'From:' header (msisolak@yahoo.com),
|
||||
support Bcc header, case-insensitive headers, enhanced error reporting,
|
||||
automatic proper line ending conversion, fix crash with Cc, fix buffer
|
||||
overflows with $header. (Markus)
|
||||
- Improved IMAP extension performance. (adam.kauffman@mindspring.com,
|
||||
rjs3@andrew.cmu.edu, Jon)
|
||||
- Added optional 5th parameter to domxml_xslt_process(). When set, profiling
|
||||
information is saved to the specified file. (chregu)
|
||||
- Added MD5 support for crypt() on Windows. (Edin)
|
||||
- Fixed resource bug in LDAP extension. (Stig Venaas)
|
||||
- Fixed crash in output buffering when buffer is overwritten in a callback.
|
||||
(Yasuo)
|
||||
- Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
|
||||
and remove variables from the URL-Rewriter. (Thies)
|
||||
- The Windows build can now be configured more comfortably, for example
|
||||
when dealing with built-in extensions. (Sebastian)
|
||||
- Added optional 3rd parameter to mysql_select_db() which makes it return
|
||||
the previously selected database name. (Jani)
|
||||
- Added large OID value (2^31 to 2^32) support for pg_lo_import(),
|
||||
pg_lo_unlink(), pg_lo_open() and pg_lo_export(). (Yasuo)
|
||||
- Made the mbstring extension to be enabled by default. (Yasuo)
|
||||
- Fixed mixing OCIPlogon() and OCINLogon() to not leak Oracle-Sessions. (Thies)
|
||||
- Added php.ini options for EXIF extension to encode and decode Unicode/JIS
|
||||
user comments. (Marcus)
|
||||
- Changed the "-c" CLI/CGI option to allow both 'filename' and
|
||||
'path to php.ini'. (Yasuo)
|
||||
- Added version information to the .dll and .exe files created under Windows.
|
||||
(jtate)
|
||||
- Added __FUNCTION__ and __CLASS__ constants. (Jani, Zend Engine)
|
||||
- Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
|
||||
and pg_delete(). (Yasuo)
|
||||
- Added optional 2nd parameter for pg_result_status() to specify return type.
|
||||
(Yasuo)
|
||||
- Added "log_errors_max_len" php.ini option which controls maximum length for
|
||||
error messages. (Marcus)
|
||||
- Added "ignore_repeated_errors" and "ignore_repeated_source" php.ini options
|
||||
which can be used to disable logging of repeated error messages. (Marcus)
|
||||
- Made pg_last_notice() work correctly. (Yasuo)
|
||||
- Added "pgsql.ignore_notice" and "pgsql.log_notice" php.ini options. (Yasuo)
|
||||
- Added "zlib.output_compression_level" php.ini option. (Stig)
|
||||
- Added support for --with-apxs build on Mac OS X / Darwin. (markonen)
|
||||
- Added support for dynamically loaded extensions on OS X / Darwin.
|
||||
NOTE: This requires Apache 1.3.25 or later. (kalowsky, markonen)
|
||||
- Fixed CR/LF processing in quoted_printable_decode() on Win32. (kir)
|
||||
- Made crack extension available on Win32. Cracklib libraries for Win32 are
|
||||
available at http://www.jtatesoftware.com/cracklib/. (jtate)
|
||||
- Added mysql_info() function. (Jan)
|
||||
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
|
||||
- Added file_get_contents() which returns the contents of a file as a string.
|
||||
This function also supports the URL wrappers. (Wez)
|
||||
- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
|
||||
when filenames have ':' characters. (Wez)
|
||||
- Added URL-wrapper support to exif. (Marcus)
|
||||
- PHP now has a new stream system that allows it to do some clever stuff with
|
||||
fopen() and fsockopen(). As a result:
|
||||
. URL wrappers natively supports https:// URLs
|
||||
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
|
||||
. copy($srcfilename, $destfilename) can now be used with URL wrappers
|
||||
. zlib wrappers/streams can be used even on systems without fopencookie()
|
||||
. Added 'compress.bzip2://' stream and wrapper support.
|
||||
. Added user-space streams - it is now possible to define a class in PHP
|
||||
code and register it as a URL wrapper.
|
||||
. Most extensions now support streams when passing files, which means
|
||||
that those extensions will support URL wrappers. (Wez)
|
||||
. Added memory stream support. (Marcus)
|
||||
- Fixed memory allocation problem on systems that have iconv() support in libc.
|
||||
(Yasuo)
|
||||
- Made var_dump() handle recursive structures better. (Yasuo)
|
||||
- Added exif_imagetype() function. (Marcus)
|
||||
- New improved build system. Among other improvements, replaces the slow
|
||||
recursive make with one global Makefile and eases the integration of proper
|
||||
dependencies. Automake is only needed for its aclocal tool. The build
|
||||
process is now more portable and less resource-consuming. (Sascha)
|
||||
- Report the right exit code after a call to exit(). (Edin)
|
||||
|
||||
22 Jul 2002, Version 4.2.2
|
||||
- Fixed serious security vulnerability. (Stefan Esser)
|
||||
|
||||
13 May 2002, Version 4.2.1
|
||||
- Added safe-mode checks to show_source(), parse_ini_file() and rmdir(). Also
|
||||
@@ -165,19 +80,13 @@ PHP 4 NEWS
|
||||
- ATTENTION!! register_globals defaults to 'off' now !!!
|
||||
- Note: Apache2 support is EXPERIMENTAL.
|
||||
- PostgreSQL functions are renamed, but all old function names are available.
|
||||
Old function names will be available long enough. User can safely use old
|
||||
Old function names will be available long enough. User can safely use old
|
||||
function names. (Yasuo)
|
||||
- Moved ext/mailparse to PECL. See http://thebrainroom.com/opensource/php/
|
||||
for more information and to download the extension. (Wez/Jim)
|
||||
- Fixed pg_last_notice() crash. (Yasuo)
|
||||
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
|
||||
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
|
||||
enabled. (Jason)
|
||||
- Added CLI (command line interface) sapi which is more suitable for writing
|
||||
shell scripts. Some of the differences to CGI sapi are: no HTTP headers,
|
||||
plain text error messages, does not change working directory, have a new -r
|
||||
option which executes a piece of PHP code directly from the commmand line, etc.
|
||||
"make install" will install CLI SAPI version of php in {PREFIX}/bin/php while
|
||||
CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin)
|
||||
- Fixed HTTP file upload support to handle big files better. (Jani)
|
||||
- Major modifications to the Sockets Extension and its API (Jason):
|
||||
. Fixed numerous bugs.
|
||||
@@ -367,8 +276,6 @@ PHP 4 NEWS
|
||||
in itself. (Andrei)
|
||||
- Added ini_get_all() function which returns all registered ini entries
|
||||
or entries for the specified extension. (Jani)
|
||||
- Added mailparse_uudecode_all() which extracts all uuencoded attachments.
|
||||
(Wez)
|
||||
- Added support for chinese encodings in htmlentities() and htmlspecialchars().
|
||||
(Patch by Alan Knowles <alan_k@hklc.com> and Wez)
|
||||
- Improved support for autoconf-2.50+/libtool 1.4b+. (Jan Kneschke, Sascha)
|
||||
|
||||
+5
-10
@@ -13,16 +13,11 @@ HOW TO USE IT
|
||||
|
||||
./ext_skel --extname=module_name
|
||||
|
||||
and everything you need is placed in directory module_name.
|
||||
|
||||
[ Note that GNU awk is likely required for this script to work. Debian
|
||||
systems seem to default to using mawk, so you may need to change the
|
||||
#! line in skeleton/create_stubs to use gawk explicitly. ]
|
||||
|
||||
If you don't need to test the existence of any external header files,
|
||||
libraries or functions in them, the module is already almost ready to be
|
||||
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
|
||||
cd back up to PHP sources top directory, and do
|
||||
and everything you need is placed in directory module_name. In fact, if you
|
||||
don't need to test the existence of any external header files, libraries or
|
||||
functions in them, the module is already almost ready to be compiled in PHP.
|
||||
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
|
||||
sources top directory, and do
|
||||
|
||||
./buildconf; ./configure --enable-module_name; make
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
|
||||
the PHP source. To create such an extension, three things are
|
||||
required:
|
||||
|
||||
- Makefile template (Makefile.in)
|
||||
- Configuration file (config.m4)
|
||||
- Source code for your module
|
||||
|
||||
@@ -73,9 +74,28 @@ DEFINING THE NEW EXTENSION
|
||||
need to specify anything).
|
||||
|
||||
|
||||
CREATING THE MAKEFILE TEMPLATE
|
||||
|
||||
The Makefile Template (Makefile.in) contains three lines:
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
LTLIBRARY_SHARED_NAME = foobar.la
|
||||
LTLIBRARY_SOURCES = foo.c bar.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
LTLIBRARY_SHARED_NAME specifies the name of the extension.
|
||||
It must be of the form `ext-name.la'.
|
||||
|
||||
LTLIBRARY_SOURCES specifies the names of the sources files. You can
|
||||
name an arbitrary number of source files here.
|
||||
|
||||
The final include directive includes the build rules (you usually
|
||||
don't need to care about what happens there). rules.mk and other
|
||||
files are installed by phpize which we will cover later.
|
||||
|
||||
|
||||
CREATING THE M4 CONFIGURATION FILE
|
||||
|
||||
The m4 configuration can perform additional checks. For a
|
||||
@@ -87,17 +107,13 @@ PHP_ARG_ENABLE(foobar,whether to enable foobar,
|
||||
[ --enable-foobar Enable foobar])
|
||||
|
||||
if test "$PHP_FOOBAR" != "no"; then
|
||||
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared)
|
||||
PHP_EXTENSION(foobar, $ext_shared)
|
||||
fi
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
PHP_ARG_ENABLE will automatically set the correct variables, so
|
||||
that the extension will be enabled by PHP_NEW_EXTENSION in shared mode.
|
||||
that the extension will be enabled by PHP_EXTENSION in shared mode.
|
||||
|
||||
The first argument of PHP_NEW_EXTENSION describes the name of the
|
||||
extension. The second names the source-code files. The third passes
|
||||
$ext_shared which is set by PHP_ARG_ENABLE/WITH to PHP_NEW_EXTENSION.
|
||||
|
||||
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
|
||||
plan to distribute your module with PHP, these facilities allow you
|
||||
to integrate your module easily into the main PHP module framework.
|
||||
@@ -115,8 +131,8 @@ CREATING SOURCE FILES
|
||||
|
||||
CREATING THE SELF-CONTAINED EXTENSION
|
||||
|
||||
Put config.m4 and the source files into one directory. Afterwards,
|
||||
run phpize (this is installed during make install by PHP 4.0).
|
||||
Put Makefile.in, config.m4 and the source files into one directory.
|
||||
Then run phpize (this is installed during make install by PHP 4.0).
|
||||
For example, if you configured PHP with --prefix=/php, you would run
|
||||
|
||||
$ /php/bin/phpize
|
||||
@@ -141,13 +157,17 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
|
||||
support to an existing module called foo.
|
||||
|
||||
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
|
||||
automatically be able to use --with-foo=shared[,..] or
|
||||
--enable-foo=shared[,..].
|
||||
automatically be able to use --with-foo=shared or
|
||||
--enable-foo=shared.
|
||||
|
||||
2. In config.m4, use PHP_NEW_EXTENSION(foo,.., $ext_shared) to enable
|
||||
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
|
||||
building the extension.
|
||||
|
||||
3. Add the following lines to your C source file:
|
||||
3. Add the following line to Makefile.in:
|
||||
|
||||
LTLIBRARY_SHARED_NAME = foo.la
|
||||
|
||||
4. Add the following lines to your C source file:
|
||||
|
||||
#ifdef COMPILE_DL_FOO
|
||||
ZEND_GET_MODULE(foo)
|
||||
|
||||
+57
-181
@@ -4,6 +4,9 @@ $Id$
|
||||
|
||||
Please send comments to: Wez Furlong <wez@thebrainroom.com>
|
||||
|
||||
Note: this doc is preliminary and is intended to give the reader an idea of
|
||||
how streams work and should be used.
|
||||
|
||||
Why Streams?
|
||||
============
|
||||
You may have noticed a shed-load of issock parameters flying around the PHP
|
||||
@@ -23,7 +26,7 @@ The main functions are:
|
||||
|
||||
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
|
||||
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
|
||||
count);
|
||||
count);
|
||||
PHPAPI int php_stream_eof(php_stream * stream);
|
||||
PHPAPI int php_stream_getc(php_stream * stream);
|
||||
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
|
||||
@@ -37,119 +40,16 @@ names: fread, fwrite, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
|
||||
|
||||
Opening Streams
|
||||
===============
|
||||
In most cases, you should use this API:
|
||||
Ultimately, I aim to implement an fopen_wrapper-like call to do this with
|
||||
minimum fuss.
|
||||
Currently, mostly for testing purposes, you can use php_stream_fopen to open a
|
||||
stream on a regular file.
|
||||
|
||||
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
|
||||
int options, char **opened_path TSRMLS_DC);
|
||||
PHPAPI php_stream * php_stream_fopen(const char * filename, const char *
|
||||
mode);
|
||||
|
||||
Where:
|
||||
path is the file or resource to open.
|
||||
mode is the stdio compatible mode eg: "wb", "rb" etc.
|
||||
options is a combination of the following values:
|
||||
IGNORE_PATH (default) - don't use include path to search for the file
|
||||
USE_PATH - use include path to search for the file
|
||||
IGNORE_URL - do not use plugin wrappers
|
||||
REPORT_ERRORS - show errors in a standard format if something
|
||||
goes wrong.
|
||||
STREAM_MUST_SEEK - If you really need to be able to seek the stream
|
||||
and don't need to be able to write to the original
|
||||
file/URL, use this option to arrange for the stream
|
||||
to be copied (if needed) into a stream that can
|
||||
be seek()ed.
|
||||
|
||||
opened_path is used to return the path of the actual file opened,
|
||||
but if you used STREAM_MUST_SEEK, may not be valid. You are
|
||||
responsible for efree()ing opened_path. opened_path may be (and usually
|
||||
is) NULL.
|
||||
|
||||
If you need to open a specific stream, or convert standard resources into
|
||||
streams there are a range of functions to do this defined in php_streams.h.
|
||||
A brief list of the most commonly used functions:
|
||||
|
||||
PHPAPI php_stream *php_stream_fopen_from_file(FILE *file, const char *mode);
|
||||
Convert a FILE * into a stream.
|
||||
|
||||
PHPAPI php_stream *php_stream_fopen_tmpfile(void);
|
||||
Open a FILE * with tmpfile() and convert into a stream.
|
||||
|
||||
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
|
||||
const char *pfx, char **opened_path TSRMLS_DC);
|
||||
Generate a temporary file name and open it.
|
||||
|
||||
There are some network enabled relatives in php_network.h:
|
||||
|
||||
PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent);
|
||||
Convert a socket into a stream.
|
||||
|
||||
PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
|
||||
int socktype, int timeout, int persistent);
|
||||
Open a connection to a host and return a stream.
|
||||
|
||||
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
|
||||
struct timeval *timeout);
|
||||
Open a UNIX domain socket.
|
||||
|
||||
|
||||
Stream Utilities
|
||||
================
|
||||
|
||||
If you need to copy some data from one stream to another, you will be please
|
||||
to know that the streams API provides a standard way to do this:
|
||||
|
||||
PHPAPI size_t php_stream_copy_to_stream(php_stream *src,
|
||||
php_stream *dest, size_t maxlen);
|
||||
|
||||
If you want to copy all remaining data from the src stream, pass
|
||||
PHP_STREAM_COPY_ALL as the maxlen parameter, otherwise maxlen indicates the
|
||||
number of bytes to copy.
|
||||
This function will try to use mmap where available to make the copying more
|
||||
efficient.
|
||||
|
||||
If you want to read the contents of a stream into an allocated memory buffer,
|
||||
you should use:
|
||||
|
||||
PHPAPI size_t php_stream_copy_to_mem(php_stream *src, char **buf,
|
||||
size_t maxlen, int persistent);
|
||||
|
||||
This function will set buf to the address of the buffer that it allocated,
|
||||
which will be maxlen bytes in length, or will be the entire length of the
|
||||
data remaining on the stream if you set maxlen to PHP_STREAM_COPY_ALL.
|
||||
The buffer is allocated using pemalloc(); you need to call pefree() to
|
||||
release the memory when you are done.
|
||||
As with copy_to_stream, this function will try use mmap where it can.
|
||||
|
||||
If you have an existing stream and need to be able to seek() it, you
|
||||
can use this function to copy the contents into a new stream that can
|
||||
be seek()ed:
|
||||
|
||||
PHPAPI int php_stream_make_seekable(php_stream *origstream, php_stream **newstream);
|
||||
|
||||
It returns one of the following values:
|
||||
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
|
||||
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
|
||||
#define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */
|
||||
#define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */
|
||||
|
||||
make_seekable will always set newstream to be the stream that is valid
|
||||
if the function succeeds.
|
||||
When you have finished, remember to close the stream.
|
||||
|
||||
NOTE: If you only need to seek forwards, there is no need to call this
|
||||
function, as the php_stream_seek can emulate forward seeking when the
|
||||
whence parameter is SEEK_CUR.
|
||||
|
||||
NOTE: Writing to the stream may not affect the original source, so it
|
||||
only makes sense to use this for read-only use.
|
||||
|
||||
NOTE: If the origstream is network based, this function will block
|
||||
until the whole contents have been downloaded.
|
||||
|
||||
NOTE: Never call this function with an origstream that is referenced
|
||||
as a resource! It will close the origstream on success, and this
|
||||
can lead to a crash when the resource is later used/released.
|
||||
|
||||
NOTE: If you are opening a stream and need it to be seekable, use the
|
||||
STREAM_MUST_SEEK option to php_stream_open_wrapper();
|
||||
This call behaves just like fopen(), except it returns a stream instead of a
|
||||
FILE *
|
||||
|
||||
Casting Streams
|
||||
===============
|
||||
@@ -159,14 +59,14 @@ You need to "cast" the stream into a FILE*, and this is how you do it:
|
||||
FILE * fp;
|
||||
php_stream * stream; /* already opened */
|
||||
|
||||
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, &fp, 1) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
The prototype is:
|
||||
|
||||
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
|
||||
show_err);
|
||||
show_err);
|
||||
|
||||
The show_err parameter, if non-zero, will cause the function to display an
|
||||
appropriate error message of type E_WARNING if the cast fails.
|
||||
@@ -183,14 +83,8 @@ if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
|
||||
If your system has the fopencookie function, php streams can synthesize a
|
||||
FILE* on top of any stream, which is useful for SSL sockets, memory based
|
||||
streams, data base streams etc. etc.
|
||||
|
||||
In situations where this is not desireable, you should query the stream
|
||||
to see if it naturally supports FILE *. You can use this code snippet
|
||||
for this purpose:
|
||||
|
||||
if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) {
|
||||
/* can safely cast to FILE* with no adverse side effects */
|
||||
}
|
||||
NOTE: There might be situations where this is not desireable, and we need to
|
||||
provide a flag to inform the casting routine of this.
|
||||
|
||||
You can use:
|
||||
|
||||
@@ -199,15 +93,10 @@ PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
|
||||
to find out if a stream can be cast, without actually performing the cast, so
|
||||
to check if a stream is a socket you might use:
|
||||
|
||||
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
|
||||
/* it can be a socket */
|
||||
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
|
||||
/* it's a socket */
|
||||
}
|
||||
|
||||
Please note the difference between php_stream_is and php_stream_can_cast;
|
||||
stream_is tells you if the stream is a particular type of stream, whereas
|
||||
can_cast tells you if the stream can be forced into the form you request.
|
||||
The former doesn't change anything, while the later *might* change some
|
||||
state in the stream.
|
||||
|
||||
Stream Internals
|
||||
================
|
||||
@@ -220,10 +109,10 @@ underlying implementation.
|
||||
The php_streams ops struct consists of pointers to methods that implement
|
||||
read, write, close, flush, seek, gets and cast operations. Of these, an
|
||||
implementation need only implement write, read, close and flush. The gets
|
||||
method is intended to be used for streams if there is an underlying method
|
||||
that can efficiently behave as fgets. The ops struct also contains a label
|
||||
for the implementation that will be used when printing error messages - the
|
||||
stdio implementation has a label of "STDIO" for example.
|
||||
method is intended to be used for non-buffered streams if there is an
|
||||
underlying method that can efficiently behave as fgets. The ops struct also
|
||||
contains a label for the implementation that will be used when printing error
|
||||
messages - the stdio implementation has a label of "STDIO" for example.
|
||||
|
||||
The idea is that a stream implementation defines a php_stream_ops struct, and
|
||||
associates it with a php_stream using php_stream_alloc.
|
||||
@@ -232,17 +121,17 @@ As an example, the php_stream_fopen() function looks like this:
|
||||
|
||||
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
|
||||
{
|
||||
FILE * fp = fopen(filename, mode);
|
||||
php_stream * ret;
|
||||
|
||||
if (fp) {
|
||||
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
|
||||
if (ret)
|
||||
return ret;
|
||||
FILE * fp = fopen(filename, mode);
|
||||
php_stream * ret;
|
||||
|
||||
if (fp) {
|
||||
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
return NULL;
|
||||
fclose(fp);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
|
||||
@@ -254,7 +143,7 @@ to be passed back to fopen_wrapper (or it's yet to be implemented successor).
|
||||
The prototype for php_stream_alloc is this:
|
||||
|
||||
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
|
||||
size_t bufsize, int persistent, const char * mode)
|
||||
size_t bufsize, int persistent, const char * mode)
|
||||
|
||||
ops is a pointer to the implementation,
|
||||
abstract holds implementation specific data that is relevant to this instance
|
||||
@@ -275,19 +164,6 @@ into a FILE*, so it should be compatible with the mode parameter of fopen().
|
||||
Writing your own stream implementation
|
||||
======================================
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
RULE #1: when writing your own streams: make sure you have configured PHP with
|
||||
--enable-debug.
|
||||
I've taken some great pains to hook into the zend memory manager to help track
|
||||
down allocation problems. It will also help you spot incorrect use of the
|
||||
STREAMS_DC, STREAMS_CC and the semi-private STREAMS_REL_CC macros for function
|
||||
definitions.
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
RULE #2: Please use the stdio stream as a reference; it will help you
|
||||
understand the semantics of the stream operations, and it will always
|
||||
be more up to date than these docs :-)
|
||||
|
||||
First, you need to figure out what data you need to associate with the
|
||||
php_stream. For example, you might need a pointer to some memory for memory
|
||||
based streams, or if you were making a stream to read data from an RDBMS like
|
||||
@@ -300,9 +176,9 @@ appropriately), and use the abstract pointer to refer to it.
|
||||
|
||||
For structured state you might have this:
|
||||
|
||||
struct my_state {
|
||||
MYSQL conn;
|
||||
MYSQL_RES * result;
|
||||
struct my_state {
|
||||
MYSQL conn;
|
||||
MYSQL_RES * result;
|
||||
};
|
||||
|
||||
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
|
||||
@@ -325,32 +201,32 @@ For example, for reading from this wierd mysql stream:
|
||||
|
||||
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
|
||||
{
|
||||
struct my_state * state = (struct my_state*)stream->abstract;
|
||||
struct my_state * state = (struct my_state*)stream->abstract;
|
||||
|
||||
if (buf == NULL && count == 0) {
|
||||
/* in this special case, php_streams is asking if we have reached the
|
||||
* end of file */
|
||||
if (... at end of file ...)
|
||||
return EOF;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* pull out some data from the stream and put it in buf */
|
||||
... mysql_fetch_row(state->result) ...
|
||||
/* we could do something strange, like format the data as XML here,
|
||||
and place that in the buf, but that brings in some complexities,
|
||||
such as coping with a buffer size too small to hold the data,
|
||||
so I won't even go in to how to do that here */
|
||||
if (buf == NULL && count == 0) {
|
||||
/* in this special case, php_streams is asking if we have reached the
|
||||
* end of file */
|
||||
if (... at end of file ...)
|
||||
return EOF;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* pull out some data from the stream and put it in buf */
|
||||
... mysql_fetch_row(state->result) ...
|
||||
/* we could do something strange, like format the data as XML here,
|
||||
and place that in the buf, but that brings in some complexities,
|
||||
such as coping with a buffer size too small to hold the data,
|
||||
so I won't even go in to how to do that here */
|
||||
}
|
||||
|
||||
Implement the other operations - remember that write, read, close and flush
|
||||
are all mandatory. The rest are optional. Declare your stream ops struct:
|
||||
|
||||
php_stream_ops my_ops = {
|
||||
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
|
||||
php_mysqlop_flush, NULL, NULL, NULL,
|
||||
"Strange mySQL example"
|
||||
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
|
||||
php_mysqlop_flush, NULL, NULL, NULL,
|
||||
"Strange mySQL example"
|
||||
}
|
||||
|
||||
Thats it!
|
||||
@@ -364,4 +240,4 @@ connection and then use pefree to dispose of the struct you allocated.
|
||||
You may read the stream->persistent field to determine if your struct was
|
||||
allocated in persistent mode or not.
|
||||
|
||||
vim:tw=78:et
|
||||
vim:tw=78
|
||||
@@ -1,121 +0,0 @@
|
||||
Submitting Patch for PHP
|
||||
========================
|
||||
|
||||
This document describes how to submit a patch for PHP. Since you are
|
||||
reading this document, you are willing to submit a patch for PHP.
|
||||
Please keep reading! Submitting a patch for PHP is easy. The hard
|
||||
part is making it acceptable for inclusion into our repository. :-)
|
||||
|
||||
How to create patch?
|
||||
--------------------
|
||||
We are working with CVS. You need to get CVS source to create a patch
|
||||
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
|
||||
source. You can check out older versions, but make sure you get
|
||||
the default branch (i.e. Do not use -r option when you check out the
|
||||
CVS source)
|
||||
|
||||
Read CODING_STANDARDS file before you start working.
|
||||
|
||||
Now you are ready to create a patch. Modify source to fix a bug in PHP or
|
||||
add a new feature to PHP. After you finished editing, please test your
|
||||
patch. Read README.TESTING for testing.
|
||||
|
||||
After you finish testing your patch, take diff file using
|
||||
"cvs diff > your.patch" command.
|
||||
|
||||
Read README.TESTING for submitting a test script for your patch. This is
|
||||
not strictly required, but it is preferred to submit a test script along
|
||||
with your patch. Making new test script is very easy. It also helps us
|
||||
to understand what you have been fixed or added to PHP.
|
||||
|
||||
|
||||
Tips for creating patch
|
||||
-----------------------
|
||||
If you would like to fix multiple bugs. It is easier for us if you
|
||||
could create 1 patch for 1 bug, but this is not strictly required.
|
||||
Note though that you might get little response, if your patch is
|
||||
too hard to review.
|
||||
|
||||
If you would like change/add many lines, it is better to ask module
|
||||
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
|
||||
you are patching PEAR. Official module maintainers can be found in
|
||||
EXTENSIONS file in PHP source.
|
||||
|
||||
If you are new to CVS (Concurrent Versions System), visit
|
||||
http://cvshome.org/ for details.
|
||||
|
||||
|
||||
Recommended CVS client settings for creating patch file
|
||||
------------------------------------------------------
|
||||
Recommended ~/.cvsrc file setting is:
|
||||
------
|
||||
cvs -z3
|
||||
update -d -P
|
||||
checkout -P
|
||||
diff -u
|
||||
|
||||
------
|
||||
diff -u means:
|
||||
-u Use the unified output format.
|
||||
|
||||
With this CVS setting, you don't have to worry about adding/deleting
|
||||
newlines and spaces.
|
||||
|
||||
|
||||
Check list for submitting patch
|
||||
-------------------------------
|
||||
- Did you run "make test" to check if your patch didn't break
|
||||
other features?
|
||||
- Did you compile PHP with --enable-debug and check php/webserver
|
||||
error logs when you test your patch?
|
||||
- Did you build PHP for multi-threaded web servers. (Optional)
|
||||
- Did you create test script for "make test"? (Recommended)
|
||||
- Did you check your patch is unified format and it does not
|
||||
contain white space changes? (If you are not using recommended
|
||||
cvs setting)
|
||||
- Did you update CVS source before you take final patch?
|
||||
- Did you read the patch again?
|
||||
|
||||
|
||||
Where to send your patch?
|
||||
-------------------------
|
||||
If you are patching C source, send the patch to php-dev@lists.php.net.
|
||||
If you are patching a module, you should also send the patch to the
|
||||
maintainer. Official module maintainers are listed in EXTENSION file
|
||||
in source.
|
||||
|
||||
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
|
||||
|
||||
Please add the prefix "[PATCH]" to your email subject and make sure
|
||||
to include the patch as a MIME attachment even if it is short.
|
||||
Test scripts should be included in the same email.
|
||||
Explain what has been fixed/added/changed by your patch.
|
||||
|
||||
Finally, add the bug Id(s) which can be closed by your patch, if any.
|
||||
|
||||
|
||||
What happens after you submit your patch
|
||||
--------------------------------------
|
||||
If your patch is easy to review and has obviously no side-effects,
|
||||
it might take up to a few hours until someone commits it.
|
||||
|
||||
Because this is a volunteer-driven effort, more complex patches will
|
||||
require more patience on your side.
|
||||
|
||||
If you did not receive any feedback in a few days, please consider
|
||||
resubmitting the description of your patch, along-side with
|
||||
these questions:
|
||||
|
||||
- Is my patch too hard to review? Because of which factors?
|
||||
- Should I split it up in multiple parts?
|
||||
- Are there any unwanted whitespace changes?
|
||||
|
||||
|
||||
What happens when your patch is applied?
|
||||
----------------------------------------
|
||||
Your name will be included together with your email address in the CVS
|
||||
commit log. If your patch affects end-users, a brief description
|
||||
and your name might be added to the NEWS file.
|
||||
|
||||
|
||||
Thank you for submitting patch for PHP!
|
||||
-175
@@ -1,175 +0,0 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
Do _not_ ask to developers why some or all tests are failed under
|
||||
your environment! Let us know if you find why it fails. Thank you.
|
||||
|
||||
|
||||
[Testing Basics]
|
||||
----------------
|
||||
To execute test scripts, you must build PHP with some SAPI, then you
|
||||
type "make test" to execute all or some test scripts saved under
|
||||
"tests" directory under source root directory.
|
||||
|
||||
Usage:
|
||||
make test
|
||||
|
||||
"make test" basically executes "run-tests.php" script
|
||||
under source root. Therefore you can execute the script
|
||||
as follows
|
||||
|
||||
./sapi/cli/php -c /path/to/php.ini/ run-tests.php [ext/some_extension_name]
|
||||
|
||||
|
||||
|
||||
[Which "php" executable "make test" look for]
|
||||
---------------------------------------------
|
||||
"make test" executes "run-tests.php" script with "php" binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
|
||||
If PHP is not build with CGI SAPI, "run-tests.php" script uses CLI
|
||||
SAPI. Tests that may not executed by CLI SAPI will be skipped.
|
||||
|
||||
NOTE: PHP binary executing "run-tests.php" and php binary used for
|
||||
executing test scripts may differ. If you use different PHP binary for
|
||||
executing "run-tests.php" script, you may get errors.
|
||||
|
||||
|
||||
[Which php.ini is used]
|
||||
-----------------------
|
||||
"make test" force to use php.ini-dist as default config file. If
|
||||
you would like to test with other configuration file, user
|
||||
"run-tests.php" script.
|
||||
|
||||
Example:
|
||||
./sapi/cli/php -c /path/to/php.ini/ ext/standard
|
||||
|
||||
If you use php.ini other than php.ini-dist, you may see more failed
|
||||
tests.
|
||||
|
||||
|
||||
[Which test scripts are executed]
|
||||
---------------------------------
|
||||
"run-tests.php" ("make test") executes all test scripts by default
|
||||
by looking all directory named "tests". If there are files have "phpt"
|
||||
extension, "run-tests.php" takes test php code from the file and
|
||||
executes it.
|
||||
|
||||
Tester can easily executes tests selectively with as follows.
|
||||
|
||||
Example:
|
||||
./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring
|
||||
|
||||
|
||||
[Test results]
|
||||
--------------
|
||||
Test results are printed to standard output. If there is a failed test,
|
||||
"run-tests.php" script saves the result, expected result and code
|
||||
executed to the test script directory. For example, if
|
||||
ext/myext/tests/myext.phpt is failed to pass, following files are
|
||||
created:
|
||||
|
||||
ext/myext/tests/myext.out - output from test script
|
||||
ext/myext/tests/myext.exp - expected output
|
||||
ext/myext/tests/myext.php - test script executed
|
||||
|
||||
Tester can verify these files, if failed test is actually a bug
|
||||
or not.
|
||||
|
||||
|
||||
[Creating new test files]
|
||||
-------------------------
|
||||
Writing test file is very easy if you are used to PHP. Test file
|
||||
has following format. Here is a actual test file from iconv module.
|
||||
|
||||
===== ext/iconv/002.phpt =======
|
||||
--TEST--
|
||||
UCS4BE to ASCII
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php include('002.inc'); ?>
|
||||
--EXPECT--
|
||||
abcd
|
||||
abcd
|
||||
===== end of ext/iconv/002.phpt =======
|
||||
|
||||
"--TEST--" is title of the test.
|
||||
"--SKIPIF--" is condition when to skip this test.
|
||||
"--POST--" is POST variable passed to test script.
|
||||
"--GET--" is GET variable passed to test script.
|
||||
"--FILE--" is the test script.
|
||||
"--EXPECT--" is the expected output from the test script.
|
||||
|
||||
ext/iconv/002.phpt uses 2 files. "skipif.inc" is used to skip
|
||||
test when test cannot be performed such as iconv module is not
|
||||
compiled or loaded.
|
||||
|
||||
==== ext/iconv/skipif.inc ====
|
||||
<?php
|
||||
// This script prints "skip" if condition does not meet.
|
||||
|
||||
if (!extension_loaded("iconv") && ini_get("enable_dl")) {
|
||||
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
|
||||
@dl("iconv$dlext");
|
||||
}
|
||||
if (!extension_loaded("iconv")) {
|
||||
die("skip\n");
|
||||
}
|
||||
?>
|
||||
==== end of ext/iconv/skipif.inc ====
|
||||
|
||||
ext/inconv/002.inc is the test script. "run-tests.php" script
|
||||
executes test script with CGI executable.
|
||||
|
||||
==== ext/iconv/002.inc ===
|
||||
<?php
|
||||
/*
|
||||
Expected output:
|
||||
abcd
|
||||
abcd
|
||||
*/
|
||||
|
||||
$s = unpack("V*", iconv("ascii","UCS-4LE", "abcd"));
|
||||
foreach($s as $c) { print "&#$c;"; } print "\n";
|
||||
|
||||
$s = pack("NNNN", 97, 98, 99, 100);
|
||||
$q = iconv("UCS-4BE", "ascii", $s);
|
||||
print $q; print "\n";
|
||||
?>
|
||||
=== end of ext/iconv/002.inc ===
|
||||
|
||||
Test script and skipif code may be directly write into *.phpt.
|
||||
However, it is recommended to use other files for ease of writing
|
||||
test script. For instance, you can execute test script under
|
||||
ext/iconv as follows:
|
||||
|
||||
./sapi/cli/php -c /path/to/php.ini/ ext/iconv
|
||||
|
||||
|
||||
[How to help us]
|
||||
----------------
|
||||
If you find bug in PHP, you can submit bug report AND test script
|
||||
for us. You don't have to write complete script, just give us test
|
||||
script with following format. Please test the script and make sure
|
||||
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
|
||||
submit.
|
||||
|
||||
<?php
|
||||
/*
|
||||
Bug #12345
|
||||
substr() bug. Do not return expected string.
|
||||
|
||||
ACTUAL OUTPUT
|
||||
XYXA
|
||||
|
||||
EXPECTED OUTPUT
|
||||
ABCD
|
||||
*/
|
||||
|
||||
$str = "XYZABCD";
|
||||
echo substr($str,3,7);
|
||||
|
||||
?>
|
||||
@@ -1,123 +0,0 @@
|
||||
PHP Build System V5 Overview
|
||||
|
||||
- supports Makefile.ins during transition phase
|
||||
- not-really-portable Makefile includes have been eliminated
|
||||
- supports seperate build directories without VPATH by using
|
||||
explicit rules only
|
||||
- does not waste disk-space/CPU-time for building temporary libraries
|
||||
=> especially noticeable on slower systems
|
||||
- slow recursive make replaced with one global Makefile
|
||||
- eases integration of proper dependencies
|
||||
- adds PHP_DEFINE(what[, value]) which creates a single include-file
|
||||
per what. This will allow more fine-grained dependencies.
|
||||
- abandoning the "one library per directory" concept
|
||||
- improved integration of the CLI
|
||||
- several new targets
|
||||
build-modules: builds and copies dynamic modules into modules/
|
||||
install-cli: installs the CLI only, so that the install-sapi
|
||||
target does only what its name says
|
||||
- finally abandoned automake (still requires aclocal at this time)
|
||||
- changed some configure-time constructs to run at buildconf-time
|
||||
- upgraded shtool to 1.5.4
|
||||
- removed $(moduledir) (use EXTENSION_DIR)
|
||||
|
||||
The Reason For a New System
|
||||
|
||||
It became more and more apparent that there is a severe need
|
||||
for addressing the portability concerns and improving the chance
|
||||
that your build is correct (how often have you been told to
|
||||
"make clean"? When this is done, you won't need to anymore).
|
||||
|
||||
|
||||
If You Build PHP on a Unix System
|
||||
|
||||
|
||||
You, as a user of PHP, will notice no changes. Of course, the build
|
||||
system will be faster, look better and work smarter.
|
||||
|
||||
|
||||
|
||||
If You Are Developing PHP
|
||||
|
||||
|
||||
|
||||
|
||||
Extension developers:
|
||||
|
||||
Makefile.ins are abandoned. The files which are to be compiled
|
||||
are specified in the config.m4 now using the following macro:
|
||||
|
||||
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)
|
||||
|
||||
E.g. this enables the extension foo which consists of three source-code
|
||||
modules, two in C and one in C++. And dependending on the user's
|
||||
wishes, the extension will even be built as a dynamic module.
|
||||
|
||||
The full syntax:
|
||||
|
||||
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
|
||||
|
||||
Please have a look at acinclude.m4 for the gory details and meanings
|
||||
of the other parameters.
|
||||
|
||||
And that's basically it for the extension side.
|
||||
|
||||
If you previously built sub-libraries for this module, add
|
||||
the source-code files here as well. If you need to specify
|
||||
separate include directories, do it this way:
|
||||
|
||||
PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib)
|
||||
|
||||
E.g. this builds the three files which are located relative to the
|
||||
extension source directory and compiles all three files with the
|
||||
special include directive (@ext_srcdir@ is automatically replaced).
|
||||
|
||||
Now, you need to tell the build system that you want to build files
|
||||
in a directory called $ext_builddir/lib:
|
||||
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/lib)
|
||||
|
||||
Make sure to call this after PHP_NEW_EXTENSION, because $ext_builddir
|
||||
is only set by the latter.
|
||||
|
||||
If you have a complex extension, you might to need add special
|
||||
Make rules. You can do this by calling PHP_ADD_MAKEFILE_FRAGMENT
|
||||
in your config.m4 after PHP_NEW_EXTENSION.
|
||||
|
||||
This will read a file in the source-dir of your extension called
|
||||
Makefile.frag. In this file, $(builddir) and $(srcdir) will be
|
||||
replaced by the values which are correct for your extension
|
||||
and which are again determined by the PHP_NEW_EXTENSION macro.
|
||||
|
||||
Make sure to prefix *all* relative paths correctly with either
|
||||
$(builddir) or $(srcdir). Because the build system does not
|
||||
change the working directory anymore, we must use either
|
||||
absolute paths or relative ones to the top build-directory.
|
||||
Correct prefixing ensures that.
|
||||
|
||||
|
||||
SAPI developers:
|
||||
|
||||
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
|
||||
|
||||
PHP_SELECT_SAPI(name, type, sources.c)
|
||||
|
||||
I.e. specify the source-code files as above and also pass the
|
||||
information regarding how PHP is supposed to be built (shared
|
||||
module, program, etc).
|
||||
|
||||
For example for APXS:
|
||||
|
||||
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
|
||||
|
||||
|
||||
|
||||
General info
|
||||
|
||||
The foundation for the new system is the flexible handling of
|
||||
sources and their contexts. With the help of macros you
|
||||
can define special flags for each source-file, where it is
|
||||
located, in which target context it can work, etc.
|
||||
|
||||
Have a look at the well documented macros
|
||||
PHP_ADD_SOURCES(_X) in acinclude.m4.
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
Advisory on the PHP Release Cycle
|
||||
|
||||
|
||||
Copyright & Liciencing
|
||||
|
||||
This Document is (c) Copyright 2000,2001 by The PHP Group
|
||||
|
||||
This Document is distributed under the terms of the GNU General
|
||||
Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Introduction
|
||||
2. Dealing with bugs
|
||||
2.1 As a QA Team Member
|
||||
2.2 As a Developer
|
||||
3. Releaseing another RC
|
||||
4. CVS During the Release Process
|
||||
4.1 Useful CVS Commands
|
||||
5 The Final Release
|
||||
6 Summary
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
This cycle should take place over roughly 10 days. When it is
|
||||
decided it is time for an Release to occur Andi/Zeev (Or
|
||||
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
|
||||
and then announce the RC on PHP-QA and PHP-DEV. At this
|
||||
point the build tracker and QA Bug System come into play.
|
||||
If you successfully build PHP then report it in the build
|
||||
tracker, If you then run and complete all the tests you
|
||||
should report this too in the build tracker when
|
||||
these features become avalible.
|
||||
|
||||
2. Dealing with Bugs
|
||||
|
||||
2.1 As a QA Team member
|
||||
|
||||
If you find a bug in an RC that you think is a showstopper
|
||||
then, even if it is a known bug, you should report it in the
|
||||
QA Bug system. This marks the bug for discussion at least,
|
||||
and preferably fixing before the actual release. This system
|
||||
is separate from the main bugs system so that important bugs
|
||||
dont get lost in the midst if lots of feature/change request
|
||||
in the approach to a release. It is imperitive where
|
||||
appropraite that as a QA'er a test script, Configure options
|
||||
and PHP.ini files are provided to enable the developer to
|
||||
reproduce the bug, this is an important part of our job. If
|
||||
you have a serious bug then you should also create a test
|
||||
script to be added to the tests dir of the php source so
|
||||
that at the end of the process to enable us to make sure bug
|
||||
does not return. It is not difficult to create these test
|
||||
scripts and a readme on it can be found in
|
||||
php4/tests/README.
|
||||
|
||||
|
||||
2.2 As a Developer
|
||||
|
||||
What should happen is that when a bug is reported it
|
||||
is send to php-dev and php-qa as with other bugs. We should
|
||||
have far stricter assignment system in this bug cycle rather
|
||||
than just leaving them. Once again bugs should be able to be
|
||||
marked as To Be Fixed Before release or moved to other bug
|
||||
system. (This is currently the Release Masters responsibility)
|
||||
|
||||
Then before the actual release the qa bugs system can be
|
||||
checked and if there are outstanding To Be Fixed Before
|
||||
release bugs the Developers can see this easyly rather than
|
||||
show stoppers being dismissed and not worried about.
|
||||
|
||||
When a bug is fixed the QAer who reported the bug is emailed
|
||||
and asked to test again and see if the bug is fixed.
|
||||
|
||||
3 Releasing another RC
|
||||
|
||||
If it is felt necessary that a 2nd RC is needed then it
|
||||
should be packaged as before and announced to both lists
|
||||
again. The testing process then starts again, the RC2 is
|
||||
added to the build tracker and QA'ers are asked to build and
|
||||
retest the scripts as appropriate, espectially if you
|
||||
reported a bug, you should test thourghly for your
|
||||
bug and make sure it no longer occurs. This will normally
|
||||
add anouther 3 days to the cycle, giving QA'ers time to
|
||||
build test and report back, then for developers to
|
||||
fix any problems.
|
||||
|
||||
4 CVS during the release process
|
||||
|
||||
At the point where the first RC is create a branch is
|
||||
formed. This branch is not altered form that point onward
|
||||
other than major bug fixes. Minor non important bug
|
||||
fixes should not be applied to this branch but to the main
|
||||
tree instead. Any major bug fixes should be applied to both
|
||||
trees. The developer should test and check the RC tree then
|
||||
also test and check the MAIN tree. This is their
|
||||
responsibility to make sure (as far as possible) that the
|
||||
bug fix works on both trees.
|
||||
|
||||
4.1 Useful CVS Commands
|
||||
|
||||
To create a Branch <Should only be done by person tarballing
|
||||
the RC (The Release Master)>:
|
||||
|
||||
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
|
||||
IE:
|
||||
$ cvs tag -b php_4_0_1RC1
|
||||
|
||||
This should be executed in the PHP directory of an up to
|
||||
date checkout. Remember to also tag the Zend and TSRM repositories.
|
||||
|
||||
You can retrieve a branch in one of two ways: by checking it
|
||||
out fresh from the repository, or by switching an existing
|
||||
working copy over to the branch, I would suggest you
|
||||
checkout a new copy.
|
||||
|
||||
To check out a new copy:
|
||||
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs checkout -r php_4_0_1RC1 php4
|
||||
|
||||
|
||||
To switch a working copy (Not recomended due to possible
|
||||
commiting to wrong branch)
|
||||
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs update -r php_4_0_1RC1 php4
|
||||
|
||||
This should be done in the PHP4 directory itself.
|
||||
|
||||
To revert back to normal branch you should use the
|
||||
following:
|
||||
$ cvs update -A
|
||||
|
||||
To Commit to the branch you follow exactly the same
|
||||
procedure as normal
|
||||
$ cvs commit file.c
|
||||
|
||||
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
|
||||
|
||||
5 The Final Release
|
||||
|
||||
When it is time to make the final release the following
|
||||
proceedure should be followed. The person who is tarballing
|
||||
the final release should check the QA bugs system and make
|
||||
sure there are no showstoppers left unfixed. If there are
|
||||
then bug the person the bug is assigned to until they fix
|
||||
it. If there are no more qa bugs then they should tag the
|
||||
branch as php_4_0_<Version> and tarball as usual. An email
|
||||
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
|
||||
release and it should be added to php.net. The windows
|
||||
binaries and servelets should be built as soon as possible
|
||||
and added too, as should the windows installer.
|
||||
|
||||
6 Summary
|
||||
|
||||
Here is a summary of what a release cycle might look like:
|
||||
|
||||
Thurs: RC is agreed on and packaged, an email is sent to
|
||||
PHP_QA and PHP-DEV, the CVS is Branched and the
|
||||
Release Cycle Begins.
|
||||
|
||||
Mon: After a weekends testing most show stoppers should
|
||||
have been found (Hopefully) and the developers get to
|
||||
work on fixing them.
|
||||
|
||||
Thurs: A second RC is released if needed with the new bug
|
||||
fixes in and the QAers test again.
|
||||
|
||||
Sun: A review is made of all outstanding bugs and any show
|
||||
stoppers should be fixed. if there are no show
|
||||
stoppers then the final release is packaged and
|
||||
released on the monday morning on php.net
|
||||
|
||||
Mon: Release is made.
|
||||
|
||||
|
||||
James
|
||||
--
|
||||
James Moore
|
||||
PHP QA Team
|
||||
jmoore@php.net
|
||||
|
||||
@@ -22,6 +22,8 @@ Zend
|
||||
* Const'ify APIs. Right now, many functions leave parameters untouched,
|
||||
but don't declare those as const. This makes interaction with other
|
||||
interfaces difficult which pass const parameters to us.
|
||||
* Add try..catch/throw exception handling.
|
||||
* Fix Zend shallow copy issues with objects and arrays.
|
||||
|
||||
|
||||
global
|
||||
@@ -41,6 +43,10 @@ global
|
||||
* on some platforms unimplemented function will just do nothing
|
||||
(e.g. symlink) they should print a warning or not even be defined!
|
||||
(DONE ?)
|
||||
* Finish PHP streams abstraction, nuke all that issock stuff, implement SSL
|
||||
socket support. (wez)
|
||||
- ext/ftp/ -> all FILEs to streams
|
||||
- ext/bz2/ -> convert to stream impl.
|
||||
* Use arg_separator.input to implode args in the CGI sapi extension
|
||||
and arg_separator.input to explode in php_build_argv(). (DONE?)
|
||||
* Change the odbc_fetch_into() function to require ALWAYS the first two
|
||||
@@ -81,16 +87,10 @@ documentation
|
||||
* Add developer documentation.
|
||||
* Add detailed documentation for Java extension.
|
||||
|
||||
ext/bz2
|
||||
-------
|
||||
* Add ini setting for decompression buffer size. The default 4k is to small
|
||||
for big files and takes ages to decompress. However, 40k which perform
|
||||
quite good with big files may be to much under certain environments as
|
||||
default setting. There should be consideren different default sizes for
|
||||
different SAPIS (e.g. apache and cli).
|
||||
|
||||
ext/curl
|
||||
--------
|
||||
* Use the cURL write handler to save data for use when returning data or
|
||||
outputting data.
|
||||
* Have a warning scheme for when people use unsupported features.
|
||||
|
||||
ext/oci8
|
||||
@@ -105,12 +105,6 @@ ext/pcre
|
||||
--------
|
||||
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
|
||||
|
||||
ext/pcntl
|
||||
---------
|
||||
* Change internal callback handler to use TICKS
|
||||
* Remove all zend_extension code
|
||||
* Add object callback support to pcntl_signal()
|
||||
|
||||
ext/pgsql
|
||||
---------
|
||||
For PHP 4.3.0:
|
||||
@@ -135,8 +129,8 @@ ext/session
|
||||
|
||||
ext/sockets
|
||||
-----------
|
||||
* Implement IPv6
|
||||
* Review/Fix vectors
|
||||
* Make the extension work on windows (Daniel Beulshausen)
|
||||
* Make the extension work with Solaris and the Sun GCC
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
@@ -153,6 +147,12 @@ ext/standard
|
||||
strrpos()
|
||||
strrchr()
|
||||
strip_tags()
|
||||
* Rewrite win32 SMTP code to be usable for *ix to, maybe as a (default)
|
||||
module of its own (Hartmut)
|
||||
|
||||
ext/zziplib
|
||||
------------
|
||||
* More fully support the zziplib API
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
- clean up .cvsignores
|
||||
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
|
||||
with appropiate calls to PHP_NEW_EXTENSION
|
||||
-15
@@ -412,8 +412,6 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(NETWARE)
|
||||
return NXThreadGetId();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
@@ -432,17 +430,10 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
#ifdef NETWARE
|
||||
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
|
||||
NXHierarchy_t order = 0;
|
||||
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
|
||||
#elif defined(GNUPTH)
|
||||
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
|
||||
pth_mutex_init(mutexp);
|
||||
@@ -469,8 +460,6 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
if (mutexp) {
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
NXMutexFree(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
free(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
@@ -497,8 +486,6 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
#ifdef TSRM_WIN32
|
||||
EnterCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
return NXLock(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_acquire(mutexp, 0, NULL);
|
||||
#elif defined(PTHREADS)
|
||||
@@ -520,8 +507,6 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
#ifdef TSRM_WIN32
|
||||
LeaveCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
return NXUnlock(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_release(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
|
||||
+1
-8
@@ -13,8 +13,7 @@
|
||||
#ifndef TSRM_H
|
||||
#define TSRM_H
|
||||
|
||||
/* #ifndef WIN32 */
|
||||
#if !defined(WIN32) && !defined(NETWARE)
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "tsrm_config.h"
|
||||
#endif
|
||||
|
||||
@@ -37,9 +36,6 @@
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include <windows.h>
|
||||
#elif defined(NETWARE)
|
||||
# include <nks/thread.h>
|
||||
# include <nks/synch.h>
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
#elif defined(PTHREADS)
|
||||
@@ -54,9 +50,6 @@ typedef int ts_rsrc_id;
|
||||
#ifdef TSRM_WIN32
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(NETWARE)
|
||||
# define THREAD_T NXThreadId_t
|
||||
# define MUTEX_T NXMutex_t *
|
||||
#elif defined(GNUPTH)
|
||||
# define THREAD_T pth_t
|
||||
# define MUTEX_T pth_mutex_t *
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef TSRM_CONFIG_NW_H
|
||||
#define TSRM_CONFIG_NW_H
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
|
||||
/* #define HAVE_ALLOCA 1 */
|
||||
|
||||
#endif
|
||||
@@ -5,13 +5,11 @@
|
||||
# define TSRM_WIN32
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#elif defined(NETWARE)
|
||||
# include "tsrm_config.nw.h"
|
||||
#else
|
||||
#ifndef TSRM_WIN32
|
||||
# include "tsrm_config.h"
|
||||
# include <sys/param.h>
|
||||
#else
|
||||
# include "tsrm_config.w32.h"
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
|
||||
-260
@@ -1,260 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2002 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "TSRM.h"
|
||||
|
||||
#ifdef NETWARE
|
||||
|
||||
#ifdef USE_MKFIFO
|
||||
#include <sys/stat.h>
|
||||
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
|
||||
#include <nks/fsio.h>
|
||||
#endif
|
||||
|
||||
#include <nks/vm.h>
|
||||
#include <nks/memory.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "mktemp.h"
|
||||
|
||||
/* strtok() call in LibC is abending when used in a different address space -- hence using
|
||||
PHP's version itself for now : Venkat (30/4/02) */
|
||||
#include "tsrm_strtok_r.h"
|
||||
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
|
||||
|
||||
#define WHITESPACE " \t"
|
||||
#define MAX_ARGS 10
|
||||
|
||||
|
||||
TSRM_API FILE* popen(const char *commandline, const char *type)
|
||||
{
|
||||
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
|
||||
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
|
||||
char *filePath = NULL;
|
||||
char *ptr = NULL;
|
||||
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
|
||||
FILE *stream = NULL;
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
int pipe_handle;
|
||||
int mode = O_RDONLY;
|
||||
#else
|
||||
NXHandle_t pipe_handle;
|
||||
NXMode_t mode = NX_O_RDONLY;
|
||||
#endif
|
||||
NXExecEnvSpec_t envSpec;
|
||||
NXNameSpec_t nameSpec;
|
||||
NXVmId_t newVM = 0;
|
||||
|
||||
/* Check for validity of input parameters */
|
||||
if (!commandline || !type)
|
||||
return NULL;
|
||||
|
||||
/* Get temporary file name */
|
||||
filePath = mktemp(tempName);
|
||||
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
|
||||
if (!filePath)
|
||||
return NULL;
|
||||
|
||||
/* Set pipe mode according to type -- for now allow only "r" or "w" */
|
||||
if (strcmp(type, "r") == 0)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
mode = O_RDONLY;
|
||||
#else
|
||||
mode = NX_O_RDONLY;
|
||||
#endif
|
||||
else if (strcmp(type, "w") == 0)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
mode = O_WRONLY;
|
||||
#else
|
||||
mode = NX_O_WRONLY;
|
||||
#endif
|
||||
else
|
||||
return NULL;
|
||||
|
||||
#ifdef USE_PIPE_OPEN
|
||||
pipe_handle = pipe_open(filePath, mode);
|
||||
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
#elif defined(USE_MKFIFO)
|
||||
pipe_handle = mkfifo(filePath, mode);
|
||||
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
#else
|
||||
/*
|
||||
- NetWare doesn't require first parameter
|
||||
- Allowing LibC to choose the buffer size for now
|
||||
*/
|
||||
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
|
||||
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
|
||||
if (err)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
/* Copy the environment variables in preparation for the spawn call */
|
||||
|
||||
envCount = NXGetEnvCount() + 1; /* add one for NULL */
|
||||
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
|
||||
if (!env)
|
||||
return NULL;
|
||||
|
||||
err = NXCopyEnv(env, envCount);
|
||||
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
|
||||
if (err)
|
||||
{
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Separate commandline string into words */
|
||||
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
|
||||
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
|
||||
ptrLen = strlen(ptr);
|
||||
|
||||
command = (char*)malloc(ptrLen + 1);
|
||||
if (!command)
|
||||
{
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
strcpy (command, ptr);
|
||||
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
while (ptr && (argc < MAX_ARGS))
|
||||
{
|
||||
ptrLen = strlen(ptr);
|
||||
|
||||
argv[argc] = (char*)malloc(ptrLen + 1);
|
||||
if (!argv[argc])
|
||||
{
|
||||
NXMemFree (env);
|
||||
|
||||
if (command)
|
||||
free (command);
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
strcpy (argv[argc], ptr);
|
||||
|
||||
argc++;
|
||||
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
}
|
||||
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
|
||||
/* Setup the execution environment and spawn new process */
|
||||
|
||||
envSpec.esFlags = 0; /* Not used */
|
||||
envSpec.esArgc = argc;
|
||||
envSpec.esArgv = (void**)argv;
|
||||
envSpec.esEnv = (void**)env;
|
||||
|
||||
envSpec.esStdin.ssType =
|
||||
envSpec.esStdout.ssType = NX_OBJ_FIFO;
|
||||
envSpec.esStderr.ssType = NX_OBJ_FILE;
|
||||
/*
|
||||
envSpec.esStdin.ssHandle =
|
||||
envSpec.esStdout.ssHandle =
|
||||
envSpec.esStderr.ssHandle = -1;
|
||||
*/
|
||||
envSpec.esStdin.ssPathCtx =
|
||||
envSpec.esStdout.ssPathCtx =
|
||||
envSpec.esStderr.ssPathCtx = NULL;
|
||||
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
if (mode == O_RDONLY)
|
||||
#else
|
||||
if (mode == NX_O_RDONLY)
|
||||
#endif
|
||||
{
|
||||
envSpec.esStdin.ssPath = filePath;
|
||||
envSpec.esStdout.ssPath = stdout;
|
||||
}
|
||||
else /* Write Only */
|
||||
{
|
||||
envSpec.esStdin.ssPath = stdin;
|
||||
envSpec.esStdout.ssPath = filePath;
|
||||
}
|
||||
|
||||
envSpec.esStderr.ssPath = stdout;
|
||||
|
||||
nameSpec.ssType = NX_OBJ_FIFO;
|
||||
/* nameSpec.ssHandle = 0; */ /* Not used */
|
||||
nameSpec.ssPathCtx = NULL; /* Not used */
|
||||
nameSpec.ssPath = argv[0];
|
||||
consoleprintf ("PHP | popen: environment setup\n");
|
||||
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
|
||||
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
|
||||
if (!err)
|
||||
/* Get file pointer corresponding to the pipe (file) opened */
|
||||
stream = fdopen(pipe_handle, type);
|
||||
|
||||
/* Clean-up */
|
||||
|
||||
if (env)
|
||||
NXMemFree (env);
|
||||
|
||||
if (pipe_handle)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
close(pipe_handle);
|
||||
#else
|
||||
NXClose(pipe_handle);
|
||||
#endif
|
||||
|
||||
if (command)
|
||||
free (command);
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
|
||||
return stream;
|
||||
}
|
||||
|
||||
TSRM_API int pclose(FILE* stream)
|
||||
{
|
||||
int err = 0;
|
||||
NXHandle_t fd = 0;
|
||||
|
||||
/* Get the process associated with this pipe (file) handle and terminate it */
|
||||
fd = fileno(stream);
|
||||
NXClose (fd);
|
||||
|
||||
err = fclose(stream);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2002 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TSRM_NW_H
|
||||
#define TSRM_NW_H
|
||||
|
||||
#include "TSRM.h"
|
||||
|
||||
TSRM_API FILE* popen(const char *command, const char *type);
|
||||
TSRM_API int pclose(FILE* stream);
|
||||
|
||||
#endif
|
||||
+39
-128
@@ -36,17 +36,12 @@
|
||||
#include "tsrm_win32.h"
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
/*#include "pipe.h"*/
|
||||
#include "tsrm_nw.h"
|
||||
#endif
|
||||
|
||||
#define VIRTUAL_CWD_DEBUG 0
|
||||
|
||||
#include "TSRM.h"
|
||||
|
||||
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
|
||||
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
|
||||
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
|
||||
#if defined(TSRM_WIN32) && defined(ZTS)
|
||||
MUTEX_T cwd_mutex;
|
||||
#endif
|
||||
|
||||
@@ -90,13 +85,6 @@ static int php_check_dots(const char *element, int n)
|
||||
#define IS_DIRECTORY_CURRENT(element, len) \
|
||||
(len == 1 && ptr[0] == '.')
|
||||
|
||||
#elif defined(NETWARE)
|
||||
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
|
||||
but rest of the stuff is like Unix */
|
||||
/* strtok() call in LibC is abending when used in a different address space -- hence using
|
||||
PHP's version itself for now */
|
||||
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
|
||||
#define TOKENIZER_STRING "/\\"
|
||||
|
||||
#else
|
||||
#define TOKENIZER_STRING "/"
|
||||
@@ -133,15 +121,9 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
static int php_is_dir_ok(const cwd_state *state)
|
||||
{
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
struct stat buf;
|
||||
|
||||
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
|
||||
#else
|
||||
struct stat_libc buf;
|
||||
|
||||
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
|
||||
#endif
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
@@ -149,15 +131,9 @@ static int php_is_dir_ok(const cwd_state *state)
|
||||
|
||||
static int php_is_file_ok(const cwd_state *state)
|
||||
{
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
struct stat buf;
|
||||
|
||||
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
|
||||
#else
|
||||
struct stat_libc buf;
|
||||
|
||||
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
|
||||
#endif
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
@@ -298,7 +274,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
if (path_length == 0)
|
||||
return (0);
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(__BEOS__) && !defined(NETWARE)
|
||||
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
|
||||
if (IS_ABSOLUTE_PATH(path, path_length)) {
|
||||
if (realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
@@ -333,12 +309,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
|
||||
#endif
|
||||
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
|
||||
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
|
||||
#ifndef NETWARE
|
||||
copy_amount = COPY_WHEN_ABSOLUTE;
|
||||
#else
|
||||
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
|
||||
#endif
|
||||
is_absolute = 1;
|
||||
#ifdef TSRM_WIN32
|
||||
} else if (IS_UNC_PATH(path_copy, path_length)) {
|
||||
@@ -393,15 +364,10 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
|
||||
#ifdef TSRM_WIN32
|
||||
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
|
||||
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
|
||||
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
|
||||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#elif defined(NETWARE)
|
||||
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
|
||||
if (ptr[ptr_length-1] != ':') {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#else
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
#endif
|
||||
@@ -411,12 +377,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
|
||||
}
|
||||
|
||||
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
|
||||
#ifndef NETWARE
|
||||
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
|
||||
#else
|
||||
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
|
||||
#endif
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
|
||||
state->cwd[state->cwd_length] = DEFAULT_SLASH;
|
||||
state->cwd[state->cwd_length+1] = '\0';
|
||||
@@ -466,12 +427,7 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
|
||||
#ifndef NETWARE
|
||||
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
|
||||
#else
|
||||
if (length == COPY_WHEN_ABSOLUTE(path) && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
|
||||
#endif
|
||||
length++;
|
||||
}
|
||||
temp = (char *) tsrm_do_alloca(length+1);
|
||||
@@ -570,7 +526,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -646,7 +602,6 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -660,23 +615,9 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
#else
|
||||
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
virtual_file_ex(&new_state, path, NULL);
|
||||
#ifndef TSRM_WIN32
|
||||
|
||||
retval = stat(new_state.cwd, (struct stat*)buf);
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -690,6 +631,7 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
|
||||
@@ -755,69 +697,7 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
|
||||
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
|
||||
a real chdir() and mutex it
|
||||
*/
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
char prev_cwd[MAXPATHLEN];
|
||||
char *getcwd_result;
|
||||
FILE *retval;
|
||||
|
||||
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
|
||||
if (!getcwd_result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_lock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
chdir(CWDG(cwd).cwd);
|
||||
retval = popen(command, type);
|
||||
chdir(prev_cwd);
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_unlock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#elif defined(NETWARE)
|
||||
|
||||
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
|
||||
a VCWD_CHDIR() and mutex it
|
||||
*/
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
char prev_cwd[MAXPATHLEN];
|
||||
char *getcwd_result;
|
||||
FILE *retval;
|
||||
|
||||
getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
|
||||
if (!getcwd_result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_lock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
VCWD_CHDIR(CWDG(cwd).cwd);
|
||||
retval = popen(command, type);
|
||||
VCWD_CHDIR(prev_cwd);
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_unlock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#else /* Unix */
|
||||
#ifndef TSRM_WIN32
|
||||
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
@@ -853,6 +733,37 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
|
||||
a real chdir() and mutex it
|
||||
*/
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
char prev_cwd[MAXPATHLEN];
|
||||
char *getcwd_result;
|
||||
FILE *retval;
|
||||
|
||||
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
|
||||
if (!getcwd_result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_lock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
chdir(CWDG(cwd).cwd);
|
||||
retval = popen(command, type);
|
||||
chdir(prev_cwd);
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_unlock(cwd_mutex);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+6
-23
@@ -58,19 +58,6 @@ typedef unsigned short mode_t;
|
||||
#define IS_UNC_PATH(path, len) \
|
||||
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
|
||||
|
||||
#elif defined(NETWARE)
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define COPY_WHEN_ABSOLUTE(path) \
|
||||
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(strchr(path, ':') != NULL) /* Colon indicates volume name */
|
||||
|
||||
#else
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
@@ -133,12 +120,8 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
|
||||
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#else
|
||||
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
|
||||
#endif
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
|
||||
@@ -150,7 +133,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
@@ -185,7 +168,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifdef TSRM_WIN32
|
||||
#define VCWD_LSTAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#else
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
@@ -199,7 +182,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
|
||||
#endif
|
||||
|
||||
@@ -222,7 +205,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_OPENDIR(pathname) opendir(pathname)
|
||||
#define VCWD_POPEN(command, type) popen(command, type)
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
|
||||
#else
|
||||
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
|
||||
@@ -232,7 +215,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_UTIME(path, time) utime(path, time)
|
||||
#endif
|
||||
#define VCWD_CHMOD(path, mode) chmod(path, mode)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#ifndef TSRM_WIN32
|
||||
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
|
||||
#endif
|
||||
|
||||
|
||||
+176
-351
@@ -2,140 +2,7 @@ dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile[, ext_srcdir[, ext_builddir]]])
|
||||
dnl
|
||||
dnl Processes a file called Makefile.frag in the source directory
|
||||
dnl of the most recently added extension. $(srcdir) and $(builddir)
|
||||
dnl are substituted with the proper paths. Can be used to supply
|
||||
dnl custom rules and/or additional targets.
|
||||
dnl
|
||||
AC_DEFUN(PHP_ADD_MAKEFILE_FRAGMENT,[
|
||||
ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
|
||||
ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
|
||||
ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
|
||||
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
|
||||
])
|
||||
|
||||
|
||||
dnl PHP_DEFINE(WHAT[, value])
|
||||
dnl
|
||||
dnl Creates builddir/include/what.h and in there #define WHAT value
|
||||
dnl
|
||||
AC_DEFUN(PHP_DEFINE,[
|
||||
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h]
|
||||
])
|
||||
|
||||
dnl PHP_INIT_BUILD_SYSTEM
|
||||
dnl
|
||||
AC_DEFUN(PHP_INIT_BUILD_SYSTEM,[
|
||||
mkdir include >/dev/null 2>&1
|
||||
> Makefile.objects
|
||||
> Makefile.fragments
|
||||
dnl We need to play tricks here to avoid matching the egrep line itself
|
||||
pattern=define
|
||||
egrep $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null
|
||||
])
|
||||
|
||||
dnl PHP_GEN_GLOBAL_MAKEFILE
|
||||
dnl
|
||||
dnl Generates the global makefile.
|
||||
dnl
|
||||
AC_DEFUN(PHP_GEN_GLOBAL_MAKEFILE,[
|
||||
cat >Makefile <<EOF
|
||||
srcdir = $abs_srcdir
|
||||
builddir = $abs_builddir
|
||||
top_srcdir = $abs_srcdir
|
||||
top_builddir = $abs_builddir
|
||||
EOF
|
||||
for i in $PHP_VAR_SUBST; do
|
||||
eval echo "$i = \$$i" >> Makefile
|
||||
done
|
||||
|
||||
cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
|
||||
])
|
||||
|
||||
dnl PHP_ADD_SOURCES(source-path, sources[, special-flags[, type]])
|
||||
dnl
|
||||
dnl Adds sources which are located relative to source-path to the
|
||||
dnl array of type type. Sources are processed with optional
|
||||
dnl special-flags which are passed to the compiler. Sources
|
||||
dnl can be either written in C or C++ (filenames shall end in .c
|
||||
dnl or .cpp, respectively).
|
||||
dnl
|
||||
dnl Note: If source-path begins with a "/", the "/" is removed and
|
||||
dnl the path is interpreted relative to the top build-directory.
|
||||
dnl
|
||||
dnl which array to append to?
|
||||
AC_DEFUN(PHP_ADD_SOURCES,[
|
||||
PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
|
||||
])
|
||||
dnl
|
||||
dnl PHP_ASSIGN_BUILD_VARS(type)
|
||||
dnl internal, don't use
|
||||
AC_DEFUN(PHP_ASSIGN_BUILD_VARS,[
|
||||
ifelse($1,shared,[
|
||||
b_c_pre=$shared_c_pre
|
||||
b_cxx_pre=$shared_cxx_pre
|
||||
b_c_meta=$shared_c_meta
|
||||
b_cxx_meta=$shared_cxx_meta
|
||||
b_c_post=$shared_c_post
|
||||
b_cxx_post=$shared_cxx_post
|
||||
],[
|
||||
b_c_pre=$php_c_pre
|
||||
b_cxx_pre=$php_cxx_pre
|
||||
b_c_meta=$php_c_meta
|
||||
b_cxx_meta=$php_cxx_meta
|
||||
b_c_post=$php_c_post
|
||||
b_cxx_post=$php_cxx_post
|
||||
])dnl
|
||||
b_lo=[$]$1_lo
|
||||
])
|
||||
|
||||
dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
|
||||
dnl
|
||||
dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
|
||||
dnl name of the array target-var directly, as well as whether
|
||||
dnl shared objects will be built from the sources. Should not be
|
||||
dnl used directly.
|
||||
dnl
|
||||
AC_DEFUN(PHP_ADD_SOURCES_X,[
|
||||
dnl relative to source- or build-directory?
|
||||
dnl ac_srcdir/ac_bdir include trailing slash
|
||||
case $1 in
|
||||
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
|
||||
/*[)] ac_srcdir=`echo $ac_n "$1$ac_c"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
|
||||
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
|
||||
esac
|
||||
|
||||
dnl how to build .. shared or static?
|
||||
ifelse($5,yes,PHP_ASSIGN_BUILD_VARS(shared),PHP_ASSIGN_BUILD_VARS(php))
|
||||
|
||||
dnl iterate over the sources
|
||||
old_IFS=[$]IFS
|
||||
for ac_src in $2; do
|
||||
|
||||
dnl remove the suffix
|
||||
IFS=.
|
||||
set $ac_src
|
||||
ac_obj=[$]1
|
||||
IFS=$old_IFS
|
||||
|
||||
dnl append to the array which has been dynamically chosen at m4 time
|
||||
$4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
|
||||
|
||||
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" ;;
|
||||
esac
|
||||
|
||||
dnl create a rule for the object/source combo
|
||||
cat >>Makefile.objects<<EOF
|
||||
$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
|
||||
$ac_comp
|
||||
EOF
|
||||
done
|
||||
])
|
||||
sinclude(dynlib.m4)
|
||||
|
||||
dnl
|
||||
dnl Disable building CLI
|
||||
@@ -185,35 +52,29 @@ AC_DEFUN(PHP_REMOVE_USR_LIB,[
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SETUP_OPENSSL,[
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
if test "$PHP_OPENSSL" = "no"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_INCDIR=$i/include
|
||||
fi
|
||||
if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
|
||||
OPENSSL_LIBDIR=$i/lib
|
||||
OPENSSL_DIR=$i
|
||||
OPENSSL_INC=$i/include
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_INCDIR"; then
|
||||
if test -z "$OPENSSL_DIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
|
||||
fi
|
||||
|
||||
if test -z "$OPENSSL_LIBDIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's libraries])
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$OPENSSL_INCDIR
|
||||
CPPFLAGS=-I$OPENSSL_INC
|
||||
AC_MSG_CHECKING([for OpenSSL version])
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
|
||||
yes
|
||||
#endif
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT([>= 0.9.5])
|
||||
],[
|
||||
@@ -221,27 +82,20 @@ AC_DEFUN(PHP_SETUP_OPENSSL,[
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
|
||||
PHP_ADD_LIBPATH($OPENSSL_DIR/lib)
|
||||
|
||||
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
|
||||
AC_CHECK_LIB(crypto, CRYPTO_free, [
|
||||
PHP_ADD_LIBRARY(crypto)
|
||||
],[
|
||||
AC_MSG_ERROR([libcrypto not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
|
||||
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
|
||||
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
|
||||
PHP_ADD_LIBRARY(ssl)
|
||||
],[
|
||||
AC_MSG_ERROR([libssl not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
|
||||
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
|
||||
AC_SUBST(OPENSSL_INCDIR_OPT)
|
||||
PHP_ADD_INCLUDE($OPENSSL_INC)
|
||||
])
|
||||
|
||||
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
|
||||
@@ -255,7 +109,7 @@ AC_DEFUN(PHP_EVAL_LIBLINE,[
|
||||
case $ac_i in
|
||||
-l*)
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
PHP_ADD_LIBRARY($ac_ii,,$2)
|
||||
PHP_ADD_LIBRARY($ac_ii,1,$2)
|
||||
;;
|
||||
-L*)
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
@@ -488,14 +342,16 @@ AC_DEFUN(PHP_LIBGCC_LIBPATH,[
|
||||
changequote([,])
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_ARG_ANALYZE_EX,[
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
AC_DEFUN(PHP_ARG_ANALYZE,[
|
||||
case [$]$1 in
|
||||
shared,*)
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
$1=`echo "[$]$1"|sed 's/^shared,//'`
|
||||
;;
|
||||
shared)
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
$1=yes
|
||||
;;
|
||||
no)
|
||||
@@ -508,12 +364,15 @@ no)
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_ALWAYS_SHARED([$1])
|
||||
])
|
||||
if test "$php_always_shared" = "yes"; then
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
test "[$]$1" = "no" && $1=yes
|
||||
fi
|
||||
|
||||
AC_DEFUN(PHP_ARG_ANALYZE,[
|
||||
PHP_ARG_ANALYZE_EX([$1])
|
||||
ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
|
||||
if test -n "$2"; then
|
||||
AC_MSG_RESULT([$ext_output])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -527,7 +386,9 @@ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_REAL_ARG_WITH,[
|
||||
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
|
||||
if test -n "$2"; then
|
||||
AC_MSG_CHECKING([$2])
|
||||
fi
|
||||
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
|
||||
PHP_ARG_ANALYZE($5,[$2])
|
||||
])
|
||||
@@ -543,7 +404,9 @@ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
|
||||
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
|
||||
if test -n "$2"; then
|
||||
AC_MSG_CHECKING([$2])
|
||||
fi
|
||||
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
|
||||
PHP_ARG_ANALYZE($5,[$2])
|
||||
])
|
||||
@@ -630,6 +493,10 @@ AC_DEFUN(PHP_SUBST_OLD,[
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_FAST_OUTPUT,[
|
||||
PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $1"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_MKDIR_P_CHECK,[
|
||||
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
|
||||
test -d conftestdir && rm -rf conftestdir
|
||||
@@ -645,6 +512,19 @@ dnl `mkdir -p' must be quiet about creating existing directories
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
|
||||
PHP_MKDIR_P_CHECK
|
||||
echo creating config_vars.mk
|
||||
> config_vars.mk
|
||||
for i in $PHP_VAR_SUBST; do
|
||||
eval echo "$i = \$$i" | sed 's%#%\\#%g' >> config_vars.mk
|
||||
done
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GEN_MAKEFILES,[
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $1
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TM_GMTOFF,[
|
||||
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
@@ -765,34 +645,13 @@ dnl
|
||||
dnl PHP_BUILD_SHARED
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_SHARED,[
|
||||
PHP_BUILD_PROGRAM
|
||||
OVERALL_TARGET=libphp4.la
|
||||
php_build_target=shared
|
||||
|
||||
php_c_pre=$shared_c_pre
|
||||
php_c_meta=$shared_c_meta
|
||||
php_c_post=$shared_c_post
|
||||
php_cxx_pre=$shared_cxx_pre
|
||||
php_cxx_meta=$shared_cxx_meta
|
||||
php_cxx_post=$shared_cxx_post
|
||||
php_lo=$shared_lo
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_STATIC
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_STATIC,[
|
||||
PHP_BUILD_PROGRAM
|
||||
OVERALL_TARGET=libphp4.la
|
||||
php_build_target=static
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_BUNDLE
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_BUNDLE,[
|
||||
PHP_BUILD_PROGRAM
|
||||
OVERALL_TARGET=libs/libphp4.bundle
|
||||
php_build_target=static
|
||||
])
|
||||
|
||||
@@ -800,23 +659,6 @@ dnl
|
||||
dnl PHP_BUILD_PROGRAM
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_PROGRAM,[
|
||||
OVERALL_TARGET=php
|
||||
php_c_pre='$(CC)'
|
||||
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
|
||||
php_c_post=' && echo > $[@]'
|
||||
php_cxx_pre='$(CXX)'
|
||||
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
|
||||
php_cxx_post=' && echo > $[@]'
|
||||
php_lo=o
|
||||
|
||||
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
|
||||
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
|
||||
shared_c_post=
|
||||
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
|
||||
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
|
||||
shared_cxx_post=
|
||||
shared_lo=lo
|
||||
|
||||
php_build_target=program
|
||||
])
|
||||
|
||||
@@ -852,17 +694,7 @@ AC_DEFUN(PHP_EXPAND_PATH,[
|
||||
$2="$ep_realdir/`basename \"$1\"`"
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
dnl internal, don't use
|
||||
AC_DEFUN(PHP_ADD_LIBPATH_GLOBAL,[
|
||||
AC_PHP_ONCE(LIBPATH, $1, [
|
||||
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
|
||||
LDFLAGS="$LDFLAGS -L$1"
|
||||
PHP_RPATHS="$PHP_RPATHS $1"
|
||||
])
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl PHP_ADD_LIBPATH(path[, shared-libadd])
|
||||
dnl
|
||||
@@ -871,15 +703,15 @@ dnl
|
||||
AC_DEFUN(PHP_ADD_LIBPATH,[
|
||||
if test "$1" != "/usr/lib"; then
|
||||
PHP_EXPAND_PATH($1, ai_p)
|
||||
ifelse([$2],,[
|
||||
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
$2="-R$ai_p -L$ai_p [$]$2"
|
||||
else
|
||||
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
|
||||
fi
|
||||
])
|
||||
if test "$ext_shared" = "yes" && test -n "$2"; then
|
||||
$2="-R$1 -L$1 [$]$2"
|
||||
else
|
||||
AC_PHP_ONCE(LIBPATH, $ai_p, [
|
||||
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
|
||||
LDFLAGS="$LDFLAGS -L$ai_p"
|
||||
PHP_RPATHS="$PHP_RPATHS $ai_p"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -890,7 +722,7 @@ dnl builds RPATH from PHP_RPATHS
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_RPATH,[
|
||||
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
|
||||
OLD_RPATHS=$PHP_RPATHS
|
||||
OLD_RPATHS="$PHP_RPATHS"
|
||||
unset PHP_RPATHS
|
||||
for i in $OLD_RPATHS; do
|
||||
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
|
||||
@@ -918,36 +750,31 @@ AC_DEFUN(PHP_ADD_INCLUDE,[
|
||||
])
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
dnl internal, don't use
|
||||
AC_DEFUN(PHP_X_ADD_LIBRARY,[dnl
|
||||
ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
|
||||
])dnl
|
||||
dnl
|
||||
dnl internal, don't use
|
||||
AC_DEFUN(PHP_ADD_LIBRARY_SKELETON,[
|
||||
case $1 in
|
||||
c|c_r|pthread*) ;;
|
||||
*) ifelse($3,,[
|
||||
PHP_X_ADD_LIBRARY($1,$2,$5)
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
PHP_X_ADD_LIBRARY($1,$2,$3)
|
||||
else
|
||||
$4($1,$2)
|
||||
fi
|
||||
]) ;;
|
||||
esac
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
|
||||
AC_DEFUN(PHP_X_ADD_LIBRARY,[
|
||||
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
|
||||
dnl
|
||||
dnl add a library to the link line
|
||||
dnl
|
||||
AC_DEFUN(PHP_ADD_LIBRARY,[
|
||||
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
|
||||
case $1 in
|
||||
c|c_r|pthread*) ;;
|
||||
*)
|
||||
ifelse($3,,[
|
||||
PHP_X_ADD_LIBRARY($1,$2,LIBS)
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
PHP_X_ADD_LIBRARY($1,$2,$3)
|
||||
else
|
||||
PHP_ADD_LIBRARY($1,$2)
|
||||
fi
|
||||
])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -956,9 +783,22 @@ dnl
|
||||
dnl add a library to the link line (deferred)
|
||||
dnl
|
||||
AC_DEFUN(PHP_ADD_LIBRARY_DEFER,[
|
||||
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
|
||||
case $1 in
|
||||
c|c_r|pthread*) ;;
|
||||
*)
|
||||
ifelse($3,,[
|
||||
PHP_X_ADD_LIBRARY($1,$2,DLIBS)
|
||||
],[
|
||||
if test "$ext_shared" = "yes"; then
|
||||
PHP_X_ADD_LIBRARY($1,$2,$3)
|
||||
else
|
||||
PHP_ADD_LIBRARY_DEFER($1,$2)
|
||||
fi
|
||||
])
|
||||
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
|
||||
dnl
|
||||
@@ -998,8 +838,8 @@ AC_DEFUN(PHP_ADD_LIBRARY_DEFER_WITH_PATH,[
|
||||
dnl
|
||||
dnl Set libtool variable
|
||||
dnl
|
||||
AC_DEFUN(PHP_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) libtool $1'
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -1030,15 +870,21 @@ AC_DEFUN(PHP_CHECK_CC_OPTION,[
|
||||
AC_DEFUN(PHP_REGEX,[
|
||||
|
||||
if test "$REGEX_TYPE" = "php"; then
|
||||
REGEX_LIB=regex/libregex.la
|
||||
REGEX_DIR=regex
|
||||
AC_DEFINE(HSREGEX,1,[ ])
|
||||
AC_DEFINE(REGEX,1,[ ])
|
||||
PHP_ADD_SOURCES(regex, regcomp.c regexec.c regerror.c regfree.c)
|
||||
PHP_FAST_OUTPUT(regex/Makefile)
|
||||
elif test "$REGEX_TYPE" = "system"; then
|
||||
AC_DEFINE(REGEX,0,[ ])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([which regex library to use])
|
||||
AC_MSG_RESULT([$REGEX_TYPE])
|
||||
|
||||
PHP_SUBST(REGEX_DIR)
|
||||
PHP_SUBST(REGEX_LIB)
|
||||
PHP_SUBST(HSREGEX)
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -1075,115 +921,60 @@ AC_DEFUN(PHP_AC_BROKEN_SPRINTF,[
|
||||
fi
|
||||
])
|
||||
|
||||
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir)
|
||||
dnl
|
||||
dnl Basically sets up the link-stage for building module-name
|
||||
dnl from object_var in build-dir.
|
||||
dnl
|
||||
AC_DEFUN(PHP_SHARED_MODULE,[
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
|
||||
PHP_SUBST($2)
|
||||
cat >>Makefile.objects<<EOF
|
||||
\$(phplibdir)/$1.la: $3/$1.la
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
|
||||
|
||||
$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
|
||||
\$(LIBTOOL) --mode=link \$(CC) \$(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)
|
||||
|
||||
EOF
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags]])
|
||||
dnl
|
||||
dnl Selects the SAPI name and type (static, shared, programm)
|
||||
dnl and optionally also the source-files for the SAPI-specific
|
||||
dnl objects.
|
||||
dnl
|
||||
AC_DEFUN(PHP_SELECT_SAPI,[
|
||||
PHP_SAPI=$1
|
||||
|
||||
case "$2" in
|
||||
static) PHP_BUILD_STATIC;;
|
||||
shared) PHP_BUILD_SHARED;;
|
||||
bundle) PHP_BUILD_BUNDLE;;
|
||||
program) PHP_BUILD_PROGRAM;;
|
||||
esac
|
||||
|
||||
ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
|
||||
])
|
||||
|
||||
dnl deprecated
|
||||
AC_DEFUN(PHP_EXTENSION,[
|
||||
sources=`awk -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
|
||||
|
||||
PHP_NEW_EXTENSION($1, $sources, $2, $3)
|
||||
|
||||
if test -r "$ext_srcdir/Makefile.frag"; then
|
||||
PHP_ADD_MAKEFILE_FRAGMENT
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_ADD_BUILD_DIR,[
|
||||
BUILD_DIR="$BUILD_DIR $1"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GEN_BUILD_DIRS,[
|
||||
PHP_MKDIR_P_CHECK
|
||||
if test "$ac_cv_mkdir_p" = "yes"; then
|
||||
mkdir -p $BUILD_DIR
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
|
||||
dnl PHP_EXTENSION(extname [, shared [,sapi_class]])
|
||||
dnl
|
||||
dnl Includes an extension in the build.
|
||||
dnl
|
||||
dnl "extname" is the name of the ext/ subdir where the extension resides.
|
||||
dnl "sources" is a list of files relative to the subdir which are used
|
||||
dnl to build the extension.
|
||||
dnl "extname" is the name of the ext/ subdir where the extension resides
|
||||
dnl "shared" can be set to "shared" or "yes" to build the extension as
|
||||
dnl a dynamically loadable library. Optional parameter "sapi_class" can
|
||||
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
|
||||
dnl extra-cflags are passed to the compiler, with @ext_srcdir@ being
|
||||
dnl substituted.
|
||||
AC_DEFUN(PHP_NEW_EXTENSION,[
|
||||
ext_builddir=[]PHP_EXT_BUILDDIR($1)
|
||||
ext_srcdir=[]PHP_EXT_SRCDIR($1)
|
||||
dnl If "nocli" is passed the extension will be built only with a non-cli
|
||||
dnl sapi.
|
||||
dnl
|
||||
AC_DEFUN(PHP_EXTENSION,[
|
||||
EXT_SUBDIRS="$EXT_SUBDIRS $1"
|
||||
|
||||
if test -d "$abs_srcdir/ext/$1"; then
|
||||
dnl ---------------------------------------------- Internal Module
|
||||
ext_builddir=ext/$1
|
||||
ext_srcdir=$abs_srcdir/ext/$1
|
||||
else
|
||||
dnl ---------------------------------------------- External Module
|
||||
ext_builddir=.
|
||||
ext_srcdir=$abs_srcdir
|
||||
fi
|
||||
|
||||
ifelse($5,,ac_extra=,[ac_extra=`echo $ac_n "$5$ac_c"|sed s#@ext_srcdir@#$ext_srcdir#g`])
|
||||
|
||||
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
|
||||
if test "$2" != "shared" && test "$2" != "yes" && test "$3" != "cli"; then
|
||||
dnl ---------------------------------------------- Static module
|
||||
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
|
||||
LIB_BUILD($ext_builddir)
|
||||
EXT_LTLIBS="$EXT_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
|
||||
EXT_STATIC="$EXT_STATIC $1"
|
||||
if test "$3" != "nocli"; then
|
||||
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
|
||||
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
|
||||
fi
|
||||
else
|
||||
if test "$3" = "shared" || test "$3" = "yes"; then
|
||||
if test "$2" = "shared" || test "$2" = "yes"; then
|
||||
dnl ---------------------------------------------- Shared module
|
||||
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
|
||||
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir)
|
||||
LIB_BUILD($ext_builddir,yes)
|
||||
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
|
||||
dnl ---------------------------------------------- CLI static module
|
||||
if test "$2" != "shared" && test "$2" != "yes" && test "$3" = "cli"; then
|
||||
dnl ---------------------------------------------- CLI only static module
|
||||
LIB_BUILD($ext_builddir)
|
||||
if test "$PHP_SAPI" = "cgi"; then
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
|
||||
EXT_LTLIBS="$EXT_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
|
||||
EXT_STATIC="$EXT_STATIC $1"
|
||||
else
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
|
||||
fi
|
||||
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
|
||||
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
|
||||
fi
|
||||
PHP_ADD_BUILD_DIR($ext_builddir)
|
||||
|
||||
PHP_FAST_OUTPUT($ext_builddir/Makefile)
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -1218,9 +1009,22 @@ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
|
||||
dnl from $withval.
|
||||
dnl
|
||||
AC_DEFUN(PHP_WITH_SHARED,[
|
||||
PHP_ARG_ANALYZE_EX(withval)
|
||||
shared=$ext_shared
|
||||
unset ext_shared ext_output
|
||||
case $withval in
|
||||
shared)
|
||||
shared=yes
|
||||
withval=yes
|
||||
;;
|
||||
shared,*)
|
||||
shared=yes
|
||||
withval=`echo $withval | sed -e 's/^shared,//'`
|
||||
;;
|
||||
*)
|
||||
shared=no
|
||||
;;
|
||||
esac
|
||||
if test -n "$php_always_shared"; then
|
||||
shared=yes
|
||||
fi
|
||||
])
|
||||
|
||||
dnl The problem is that the default compilation flags in Solaris 2.6 won't
|
||||
@@ -1323,6 +1127,11 @@ int main(void) {
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_ADD_LIBPATH, [indir([PHP_ADD_LIBPATH], $@)])
|
||||
AC_DEFUN(AC_ADD_LIBRARY, [indir([PHP_ADD_LIBRARY], $@)])
|
||||
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH, [indir([PHP_ADD_LIBRARY_WITH_PATH], $@)])
|
||||
AC_DEFUN(AC_ADD_INCLUDE, [indir([PHP_ADD_INCLUDE], $@)])
|
||||
|
||||
AC_DEFUN(PHP_FOPENCOOKIE,[
|
||||
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
|
||||
|
||||
@@ -1381,6 +1190,7 @@ AC_DEFUN(PHP_CHECK_LIBRARY, [
|
||||
])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
@@ -1395,11 +1205,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
|
||||
dnl
|
||||
if test "$PHP_ICONV" = "yes"; then
|
||||
AC_CHECK_FUNC(iconv, [
|
||||
PHP_DEFINE(HAVE_ICONV)
|
||||
found_iconv=yes
|
||||
],[
|
||||
AC_CHECK_FUNC(libiconv,[
|
||||
PHP_DEFINE(HAVE_LIBICONV)
|
||||
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
|
||||
found_iconv=yes
|
||||
])
|
||||
])
|
||||
@@ -1409,7 +1218,7 @@ AC_DEFUN(PHP_SETUP_ICONV, [
|
||||
dnl Check external libs for iconv funcs
|
||||
dnl
|
||||
if test "$found_iconv" = "no"; then
|
||||
|
||||
|
||||
for i in $PHP_ICONV /usr/local /usr; do
|
||||
if test -r $i/include/giconv.h; then
|
||||
AC_DEFINE(HAVE_GICONV_H, 1, [ ])
|
||||
@@ -1432,11 +1241,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
|
||||
then
|
||||
PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
|
||||
found_iconv=yes
|
||||
PHP_DEFINE(HAVE_LIBICONV)
|
||||
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
|
||||
], [
|
||||
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
|
||||
found_iconv=yes
|
||||
PHP_DEFINE(HAVE_ICONV)
|
||||
], [], [
|
||||
-L$ICONV_DIR/lib
|
||||
])
|
||||
@@ -1445,10 +1253,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "$found_iconv" = "yes"; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [ ])
|
||||
if test -n "$ICONV_DIR"; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [ ])
|
||||
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, $1)
|
||||
PHP_ADD_INCLUDE($ICONV_DIR/include)
|
||||
fi
|
||||
@@ -1456,3 +1264,20 @@ AC_DEFUN(PHP_SETUP_ICONV, [
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
|
||||
dnl This macro is used to get a comparable
|
||||
dnl version for apache1/2.
|
||||
dnl
|
||||
AC_DEFUN(PHP_AP_EXTRACT_VERSION,[
|
||||
ac_output=`$1 -v 2>&1`
|
||||
ac_IFS=$IFS
|
||||
IFS="- /.
|
||||
"
|
||||
set $ac_output
|
||||
IFS=$ac_IFS
|
||||
|
||||
APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
|
||||
])
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#! /bin/sh
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# cwd must be top_srcdir
|
||||
test -f build/bsd_makefile || exit 2
|
||||
|
||||
test -f bsd_converted && exit 0
|
||||
|
||||
tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$"
|
||||
for i in build/*.mk; do
|
||||
sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \
|
||||
&& cp $tmpfile $i
|
||||
done
|
||||
rm -f $tmpfile
|
||||
|
||||
touch bsd_converted
|
||||
exit 0
|
||||
+24
-6
@@ -30,16 +30,37 @@ config_h_in = main/php_config.h.in
|
||||
|
||||
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
targets = $(TOUCH_FILES) configure $(config_h_in)
|
||||
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
|
||||
|
||||
|
||||
all: $(targets)
|
||||
all: Zend/Makefile.am TSRM/Makefile.am $(targets)
|
||||
|
||||
Zend/Makefile.am:
|
||||
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
|
||||
|
||||
TSRM/Makefile.am:
|
||||
test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
|
||||
|
||||
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|AC_PROG_CPP was called before AC_PROG_CC)'||true)
|
||||
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding Makefile templates
|
||||
@for i in $(LT_TARGETS); do \
|
||||
if test -f "$$i"; then \
|
||||
mv $$i $$i.bak; \
|
||||
cp $$i.bak $$i; \
|
||||
fi; \
|
||||
done
|
||||
@test -f want_dependencies || flag=-i; \
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4 dynlib.m4
|
||||
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
|
||||
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_PROG_CPP was called before)'||true)
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
@@ -51,9 +72,6 @@ $(config_h_in): configure acconfig.h
|
||||
$(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
@@ -0,0 +1,24 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
all: all-recursive
|
||||
|
||||
include $(builddir)/libs.mk
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
Executable
+80
@@ -0,0 +1,80 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: fastgen.sh,v 1.14 2002-02-28 08:25:33 sebastian Exp $
|
||||
#
|
||||
|
||||
if test "$#" = "0"; then
|
||||
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
|
||||
fi
|
||||
|
||||
srcdir=$1
|
||||
shift
|
||||
|
||||
mkdir_p=$1
|
||||
shift
|
||||
|
||||
bsd_makefile=$1
|
||||
shift
|
||||
|
||||
top_srcdir=`(cd $srcdir; pwd)`
|
||||
top_builddir=`pwd`
|
||||
|
||||
if test "$mkdir_p" = "yes"; then
|
||||
mkdir_p="mkdir -p"
|
||||
else
|
||||
mkdir_p="$top_srcdir/build/shtool mkdir -p"
|
||||
fi
|
||||
|
||||
if test "$bsd_makefile" = "yes"; then
|
||||
(cd $top_srcdir; ./build/bsd_makefile)
|
||||
|
||||
for makefile in $@; do
|
||||
echo "fastgen.sh: creating $makefile"
|
||||
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
||||
$mkdir_p "$dir/"
|
||||
|
||||
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
|
||||
top_srcdir = $top_srcdir
|
||||
top_builddir = $top_builddir
|
||||
srcdir = $top_srcdir/$dir
|
||||
builddir = $top_builddir/$dir
|
||||
VPATH = $top_srcdir/$dir
|
||||
EOF
|
||||
|
||||
test -z "$dir" && dir=.
|
||||
touch $dir/.deps
|
||||
done
|
||||
else
|
||||
for makefile in $@; do
|
||||
echo "fastgen.sh: creating $makefile"
|
||||
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
||||
$mkdir_p "$dir/"
|
||||
|
||||
cat - $top_srcdir/$makefile.in <<EOF >$makefile
|
||||
top_srcdir = $top_srcdir
|
||||
top_builddir = $top_builddir
|
||||
srcdir = $top_srcdir/$dir
|
||||
builddir = $top_builddir/$dir
|
||||
VPATH = $top_srcdir/$dir
|
||||
EOF
|
||||
|
||||
test -z "$dir" && dir=.
|
||||
touch $dir/.deps
|
||||
done
|
||||
fi
|
||||
+8
-8
@@ -1,24 +1,24 @@
|
||||
#! /bin/sh
|
||||
|
||||
# $Id: genif.sh,v 1.3 2002-03-22 10:22:41 sas Exp $
|
||||
# $Id: genif.sh,v 1.2 2001-03-30 14:02:20 sas Exp $
|
||||
# replacement for genif.pl
|
||||
|
||||
infile=$1
|
||||
infile="$1"
|
||||
shift
|
||||
srcdir=$1
|
||||
srcdir="$1"
|
||||
shift
|
||||
extra_module_ptrs=$1
|
||||
extra_module_ptrs="$1"
|
||||
shift
|
||||
awk=$1
|
||||
awk="$1"
|
||||
shift
|
||||
|
||||
if test -z "$infile" || test -z "$srcdir"; then
|
||||
if test "$infile" = "" -o "$srcdir" = ""; then
|
||||
echo "please supply infile and srcdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
module_ptrs=$extra_module_ptrs
|
||||
header_list=
|
||||
module_ptrs="$extra_module_ptrs"
|
||||
header_list=""
|
||||
olddir=`pwd`
|
||||
cd $srcdir
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
|
||||
|
||||
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
|
||||
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
|
||||
@@ -0,0 +1,24 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
targets = $(LTLIBRARY_NAME)
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
include $(top_srcdir)/build/library.mk
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
|
||||
|
||||
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
|
||||
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)
|
||||
@@ -0,0 +1,70 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/build/rules_common.mk
|
||||
|
||||
all: all-recursive
|
||||
install: install-recursive
|
||||
|
||||
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
|
||||
@otarget=`echo $@|sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for i in $$list; do \
|
||||
target="$$otarget"; \
|
||||
echo "Making $$target in $$i"; \
|
||||
if test "$$i" = "."; then \
|
||||
ok=yes; \
|
||||
target="$$target-p"; \
|
||||
fi; \
|
||||
(cd $$i && $(MAKE) $$target) || exit 1; \
|
||||
done; \
|
||||
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
|
||||
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
|
||||
|
||||
all-p: $(targets)
|
||||
install-p: $(targets) $(install_targets)
|
||||
distclean-p depend-p clean-p:
|
||||
|
||||
depend: depend-recursive
|
||||
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
|
||||
|
||||
clean: clean-modules clean-recursive clean-x
|
||||
|
||||
clean-modules:
|
||||
|
||||
clean-x:
|
||||
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
|
||||
rm -rf .libs libs/*
|
||||
|
||||
distclean: distclean-recursive clean-x
|
||||
rm -f config.cache config.log config.status config_vars.mk libtool \
|
||||
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
|
||||
|
||||
test: $(top_builddir)/sapi/cli/php
|
||||
@if test "$(TESTS)" = ""; then \
|
||||
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/sapi/cli/php -c $(top_srcdir)/php.ini-dist $(top_srcdir)/run-tests.php $(srcdir); \
|
||||
else \
|
||||
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/sapi/cli/php -c $(top_srcdir)/php.ini-dist $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
fi
|
||||
|
||||
include $(builddir)/.deps
|
||||
|
||||
.PHONY: all-recursive clean-recursive install-recursive \
|
||||
$(install_targets) install all clean depend depend-recursive shared \
|
||||
distclean-recursive distclean clean-x all-p install-p distclean-p \
|
||||
depend-p clean-p
|
||||
@@ -0,0 +1,77 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include $(top_builddir)/config_vars.mk
|
||||
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
|
||||
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
|
||||
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
||||
|
||||
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
|
||||
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
||||
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
|
||||
|
||||
moduledir = $(EXTENSION_DIR)
|
||||
|
||||
CXX_SUFFIX = .cpp
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
$(CXX_SUFFIX).o:
|
||||
$(CXX_COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.c.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).lo:
|
||||
$(CXX_PHP_COMPILE)
|
||||
|
||||
.s.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
.c.slo:
|
||||
$(SHARED_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).slo:
|
||||
$(CXX_SHARED_COMPILE)
|
||||
|
||||
.y.c:
|
||||
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
|
||||
else :; fi
|
||||
|
||||
.l.c:
|
||||
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/build/rules_common.mk
|
||||
|
||||
install_targets = install-modules
|
||||
|
||||
all: all-recursive
|
||||
install: install-recursive
|
||||
|
||||
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
|
||||
@otarget=`echo $@|sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for i in $$list; do \
|
||||
target="$$otarget"; \
|
||||
echo "Making $$target in $$i"; \
|
||||
if test "$$i" = "."; then \
|
||||
ok=yes; \
|
||||
target="$$target-p"; \
|
||||
fi; \
|
||||
(cd $$i && $(MAKE) $$target) || exit 1; \
|
||||
done; \
|
||||
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
|
||||
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
|
||||
|
||||
all-p: $(targets)
|
||||
install-p: $(targets) $(install_targets)
|
||||
distclean-p depend-p clean-p:
|
||||
|
||||
depend: depend-recursive
|
||||
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
|
||||
|
||||
clean: clean-recursive clean-x
|
||||
|
||||
clean-x:
|
||||
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
|
||||
rm -rf .libs
|
||||
|
||||
distclean: distclean-recursive clean-x
|
||||
rm -f config.cache config.log config.status config_vars.mk libtool \
|
||||
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
|
||||
|
||||
cvsclean:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
|
||||
done
|
||||
@rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
|
||||
install-modules:
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(moduledir) && \
|
||||
echo "installing shared modules into $(moduledir)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(moduledir) || true
|
||||
|
||||
include $(builddir)/.deps
|
||||
|
||||
.PHONY: all-recursive clean-recursive install-recursive \
|
||||
$(install_targets) install all clean depend depend-recursive shared \
|
||||
distclean-recursive distclean clean-x all-p install-p distclean-p \
|
||||
depend-p clean-p
|
||||
+110
-181
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## GNU shtool -- The GNU Portable Shell Tool
|
||||
## Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
##
|
||||
## See http://www.gnu.org/software/shtool/ for more information.
|
||||
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
|
||||
##
|
||||
## Version: 1.5.4 (14-Jun-2001)
|
||||
## Contents: 3/17 available modules
|
||||
## Version 1.4.9 (16-Apr-2000)
|
||||
## Ingredients: 3/17 available modules
|
||||
##
|
||||
|
||||
##
|
||||
@@ -26,7 +26,7 @@
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
|
||||
##
|
||||
## NOTICE: Given that you include this file verbatim into your own
|
||||
## Notice: Given that you include this file verbatim into your own
|
||||
## source tree, you are justified in saying that it remains separate
|
||||
## from your package, and that this way you are simply just using GNU
|
||||
## shtool. So, in this situation, there is no requirement that your
|
||||
@@ -55,7 +55,7 @@
|
||||
## arx Extended archive command
|
||||
## slo Separate linker options by library class
|
||||
## scpp Sharing C Pre-Processor
|
||||
## version Maintain a version information file
|
||||
## version Generate and maintain a version information file
|
||||
## path Deal with program paths
|
||||
##
|
||||
|
||||
@@ -65,22 +65,21 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo "This is GNU shtool, version 1.5.4 (14-Jun-2001)"
|
||||
echo "Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
|
||||
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
|
||||
echo "Report bugs to <bug-shtool@gnu.org>"
|
||||
echo ''
|
||||
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
|
||||
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
|
||||
echo ''
|
||||
echo 'Available global <options>:'
|
||||
echo ' -v, --version display shtool version information'
|
||||
echo ' -h, --help display shtool usage help page (this one)'
|
||||
echo ' -d, --debug display shell trace information'
|
||||
echo ' -r, --recreate recreate this shtool script via shtoolize'
|
||||
echo ''
|
||||
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
|
||||
echo ' echo [-n] [-e] [<str> ...]'
|
||||
echo ' install [-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>]'
|
||||
echo ' [-e<sed-cmd>] <file> [<file> ...] <path>'
|
||||
echo ' [-e<ext>] <file> <path>'
|
||||
echo ' mkdir [-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]'
|
||||
echo ''
|
||||
echo 'Not available <cmd-name> (because module was not built-in):'
|
||||
@@ -91,25 +90,21 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
|
||||
echo ' mkln [-t] [-f] [-s] <src-path> [<src-path> ...] <dst-path>'
|
||||
echo ' mkshadow [-v] [-t] [-a] <src-dir> <dst-dir>'
|
||||
echo ' fixperm [-v] [-t] <path> [<path> ...]'
|
||||
echo ' tarball [-t] [-v] [-o<tarball>] [-c<prog>] [-d<dir>] [-u<user>]'
|
||||
echo ' [-g<group>] [-e<pattern>] <path> [<path> ...]'
|
||||
echo ' tarball [-t] [-v] [-o <tarball>] [-c <prog>] [-d <dir>] [-u'
|
||||
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
|
||||
echo ' guessos '
|
||||
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
|
||||
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
|
||||
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
|
||||
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
|
||||
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-e]'
|
||||
echo ' [-i<knob>] [-d<type>] <file>'
|
||||
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
|
||||
echo ' [-d<type>] <file>'
|
||||
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
|
||||
echo ''
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
|
||||
echo "GNU shtool 1.5.4 (14-Jun-2001)"
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
|
||||
shtoolize -ofoo echo install mkdir
|
||||
echo "GNU shtool 1.4.9 (16-Apr-2000)"
|
||||
exit 0
|
||||
fi
|
||||
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
|
||||
@@ -147,15 +142,15 @@ case $tool in
|
||||
;;
|
||||
install )
|
||||
str_tool="install"
|
||||
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<sed-cmd>] <file> [<file> ...] <path>"
|
||||
arg_spec="2+"
|
||||
opt_spec="v.t.c.C.s.m:o:g:e+"
|
||||
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
|
||||
arg_spec="2="
|
||||
opt_spec="v.t.c.C.s.m:o:g:e:"
|
||||
opt_v=no
|
||||
opt_t=no
|
||||
opt_c=no
|
||||
opt_C=no
|
||||
opt_s=no
|
||||
opt_m="0755"
|
||||
opt_m=""
|
||||
opt_o=""
|
||||
opt_g=""
|
||||
opt_e=""
|
||||
@@ -317,7 +312,6 @@ if [ ".$gen_tmpfile" = .yes ]; then
|
||||
tmpfile="$tmpdir/.shtool.$$"
|
||||
rm -f $tmpfile >/dev/null 2>&1
|
||||
touch $tmpfile
|
||||
chmod 600 $tmpfile
|
||||
fi
|
||||
|
||||
##
|
||||
@@ -329,7 +323,7 @@ case $tool in
|
||||
echo )
|
||||
##
|
||||
## echo -- Print string with optional construct expansion
|
||||
## Copyright (c) 1998-2001 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for WML as buildinfo
|
||||
##
|
||||
|
||||
@@ -353,7 +347,7 @@ echo )
|
||||
fi
|
||||
|
||||
# determine terminal bold sequence
|
||||
term_bold=''
|
||||
term_bold=''
|
||||
term_norm=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
|
||||
case $TERM in
|
||||
@@ -404,7 +398,7 @@ echo )
|
||||
|
||||
# determine user name
|
||||
username=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uUgG]'`" != . ]; then
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then
|
||||
username="$LOGNAME"
|
||||
if [ ".$username" = . ]; then
|
||||
username="$USER"
|
||||
@@ -446,38 +440,8 @@ echo )
|
||||
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 [ ".$groupid" = . ]; then
|
||||
groupid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \
|
||||
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
|
||||
if [ ".$groupid" = . ]; then
|
||||
groupid='?'
|
||||
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 [ ".$groupname" = . ]; then
|
||||
groupname=`(ypcat group) 2>/dev/null | \
|
||||
egrep "^[^:]*:[^:]*:${groupid}:" | \
|
||||
sed -e 's/:.*$//'`
|
||||
if [ ".$groupname" = . ]; then
|
||||
groupname='?'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# determine host and domain name
|
||||
# determine host name
|
||||
hostname=''
|
||||
domainname=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
|
||||
hostname="`(uname -n) 2>/dev/null |\
|
||||
awk '{ printf("%s", $1); }'`"
|
||||
@@ -495,6 +459,9 @@ echo )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# determine domain name
|
||||
domainname=''
|
||||
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
|
||||
if [ ".$domainname" = . ]; then
|
||||
if [ -f /etc/resolv.conf ]; then
|
||||
@@ -554,8 +521,6 @@ echo )
|
||||
-e "s/%b/${term_norm}/g" \
|
||||
-e "s/%u/${username}/g" \
|
||||
-e "s/%U/${userid}/g" \
|
||||
-e "s/%g/${groupname}/g" \
|
||||
-e "s/%G/${groupid}/g" \
|
||||
-e "s/%h/${hostname}/g" \
|
||||
-e "s/%d/${domainname}/g" \
|
||||
-e "s/%D/${time_day}/g" \
|
||||
@@ -581,144 +546,114 @@ echo )
|
||||
install )
|
||||
##
|
||||
## install -- Install a program, script or datafile
|
||||
## Copyright (c) 1997-2001 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for shtool
|
||||
##
|
||||
|
||||
# determine source(s) and destination
|
||||
argc=$#
|
||||
srcs=""
|
||||
while [ $# -gt 1 ]; do
|
||||
srcs="$srcs $1"
|
||||
shift
|
||||
done
|
||||
dstpath="$1"
|
||||
src="$1"
|
||||
dst="$2"
|
||||
|
||||
# type check for destination
|
||||
dstisdir=0
|
||||
if [ -d $dstpath ]; then
|
||||
dstpath=`echo "$dstpath" | sed -e 's:/$::'`
|
||||
dstisdir=1
|
||||
# If destination is a directory, append the input filename
|
||||
if [ -d $dst ]; then
|
||||
dst=`echo "$dst" | sed -e 's:/$::'`
|
||||
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
|
||||
dst="$dst/$dstfile"
|
||||
fi
|
||||
|
||||
# consistency check for destination
|
||||
if [ $argc -gt 2 -a $dstisdir = 0 ]; then
|
||||
echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
|
||||
# Add a possible extension to src and dst
|
||||
if [ ".$opt_e" != . ]; then
|
||||
src="$src$opt_e"
|
||||
dst="$dst$opt_e"
|
||||
fi
|
||||
|
||||
# Check for correct arguments
|
||||
if [ ".$src" = ".$dst" ]; then
|
||||
echo "$msgprefix:Error: source and destination are the same" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# iterate over all source(s)
|
||||
for src in $srcs; do
|
||||
dst=$dstpath
|
||||
# Make a temp file name in the destination directory
|
||||
dstdir=`echo $dst | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
|
||||
dsttmp="$dstdir/#INST@$$#"
|
||||
|
||||
# if destination is a directory, append the input filename
|
||||
if [ $dstisdir = 1 ]; then
|
||||
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
|
||||
dst="$dst/$dstfile"
|
||||
fi
|
||||
# Verbosity
|
||||
if [ ".$opt_v" = .yes ]; then
|
||||
echo "$src -> $dst" 1>&2
|
||||
fi
|
||||
|
||||
# check for correct arguments
|
||||
if [ ".$src" = ".$dst" ]; then
|
||||
echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
|
||||
continue
|
||||
# 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
|
||||
opt_c=yes
|
||||
fi
|
||||
if [ ".$opt_c" = .yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "cp $src $dsttmp" 1>&2
|
||||
fi
|
||||
if [ -d "$src" ]; then
|
||||
echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
|
||||
continue
|
||||
cp $src $dsttmp || exit $?
|
||||
else
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "mv $src $dsttmp" 1>&2
|
||||
fi
|
||||
mv $src $dsttmp || exit $?
|
||||
fi
|
||||
|
||||
# make a temp file name in the destination directory
|
||||
dsttmp=`echo $dst |\
|
||||
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
|
||||
-e "s;\$;/#INST@$$#;"`
|
||||
# Adjust the target file
|
||||
# (we do chmod last to preserve setuid bits)
|
||||
if [ ".$opt_s" = .yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "strip $dsttmp" 1>&2
|
||||
fi
|
||||
strip $dsttmp || exit $?
|
||||
fi
|
||||
if [ ".$opt_o" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chown $opt_o $dsttmp" 1>&2
|
||||
fi
|
||||
chown $opt_o $dsttmp || exit $?
|
||||
fi
|
||||
if [ ".$opt_g" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chgrp $opt_g $dsttmp" 1>&2
|
||||
fi
|
||||
chgrp $opt_g $dsttmp || exit $?
|
||||
fi
|
||||
if [ ".$opt_m" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chmod $opt_m $dsttmp" 1>&2
|
||||
fi
|
||||
chmod $opt_m $dsttmp || exit $?
|
||||
fi
|
||||
|
||||
# verbosity
|
||||
if [ ".$opt_v" = .yes ]; then
|
||||
echo "$src -> $dst" 1>&2
|
||||
# Determine whether to do a quick install
|
||||
# (has to be done _after_ the strip was already done)
|
||||
quick=no
|
||||
if [ ".$opt_C" = .yes ]; then
|
||||
if [ -r $dst ]; then
|
||||
if cmp -s $src $dst; then
|
||||
quick=yes
|
||||
fi
|
||||
fi
|
||||
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
|
||||
opt_c=yes
|
||||
# Finally install the file to the real destination
|
||||
if [ $quick = yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "rm -f $dsttmp" 1>&2
|
||||
fi
|
||||
if [ ".$opt_c" = .yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "cp $src $dsttmp" 1>&2
|
||||
fi
|
||||
cp $src $dsttmp || exit $?
|
||||
else
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "mv $src $dsttmp" 1>&2
|
||||
fi
|
||||
mv $src $dsttmp || exit $?
|
||||
rm -f $dsttmp
|
||||
else
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
|
||||
fi
|
||||
|
||||
# adjust the target file
|
||||
if [ ".$opt_e" != . ]; then
|
||||
sed='sed'
|
||||
for e in $opt_e; do
|
||||
sed="$sed -e '$e'"
|
||||
done
|
||||
cp $dsttmp $dsttmp.old
|
||||
eval "$sed <$dsttmp.old >$dsttmp" || 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 $?
|
||||
fi
|
||||
if [ ".$opt_o" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chown $opt_o $dsttmp" 1>&2
|
||||
fi
|
||||
chown $opt_o $dsttmp || exit $?
|
||||
fi
|
||||
if [ ".$opt_g" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chgrp $opt_g $dsttmp" 1>&2
|
||||
fi
|
||||
chgrp $opt_g $dsttmp || exit $?
|
||||
fi
|
||||
if [ ".$opt_m" != ".-" ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chmod $opt_m $dsttmp" 1>&2
|
||||
fi
|
||||
chmod $opt_m $dsttmp || exit $?
|
||||
fi
|
||||
|
||||
# determine whether to do a quick install
|
||||
# (has to be done _after_ the strip was already done)
|
||||
quick=no
|
||||
if [ ".$opt_C" = .yes ]; then
|
||||
if [ -r $dst ]; then
|
||||
if cmp -s $src $dst; then
|
||||
quick=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# finally, install the file to the real destination
|
||||
if [ $quick = yes ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "rm -f $dsttmp" 1>&2
|
||||
fi
|
||||
rm -f $dsttmp
|
||||
else
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
|
||||
fi
|
||||
rm -f $dst && mv $dsttmp $dst
|
||||
fi
|
||||
done
|
||||
rm -f $dst && mv $dsttmp $dst
|
||||
fi
|
||||
;;
|
||||
|
||||
mkdir )
|
||||
##
|
||||
## mkdir -- Make one or more directories
|
||||
## Copyright (c) 1996-2001 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
|
||||
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
## Cleaned up and enhanced for shtool
|
||||
##
|
||||
@@ -727,7 +662,7 @@ mkdir )
|
||||
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
|
||||
@@ -741,12 +676,6 @@ mkdir )
|
||||
echo "mkdir $p" 1>&2
|
||||
fi
|
||||
mkdir $p || errstatus=$?
|
||||
if [ ".$opt_m" != . ]; then
|
||||
if [ ".$opt_t" = .yes ]; then
|
||||
echo "chmod $opt_m $p" 1>&2
|
||||
fi
|
||||
chmod $opt_m $p || errstatus=$?
|
||||
fi
|
||||
else
|
||||
# the smart situation
|
||||
set fnord `echo ":$p" |\
|
||||
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#! /bin/sh
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# cwd must be top_srcdir
|
||||
test -f build/sysv_makefile || exit 2
|
||||
|
||||
test -f bsd_converted || exit 1
|
||||
|
||||
tmpfile=`mktemp /tmp/sysv_makefile.XXXXXX` || tmpfile="tmp.$$"
|
||||
for i in build/*.mk; do
|
||||
sed 's/^\.include "\(.*\)"/include \1/' $i >$tmpfile \
|
||||
&& cp $tmpfile $i
|
||||
done
|
||||
rm -f $tmpfile
|
||||
|
||||
rm bsd_converted
|
||||
exit 0
|
||||
+172
-214
@@ -24,6 +24,7 @@ dnl ## All of these are normally in the extension directories.
|
||||
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
|
||||
|
||||
|
||||
|
||||
dnl Basic autoconf + automake initialization, generation of config.nice.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -35,19 +36,11 @@ for arg in $0 "$@"; do
|
||||
done
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CONFIG_HEADER(main/php_config.h)
|
||||
AM_INIT_AUTOMAKE(php, 4.2.3, nodefine)
|
||||
AM_CONFIG_HEADER(main/php_config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
MAJOR_VERSION=4
|
||||
MINOR_VERSION=3
|
||||
RELEASE_VERSION=0
|
||||
EXTRA_VERSION="-dev"
|
||||
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
|
||||
|
||||
dnl Setting up the PHP version based on the information above.
|
||||
dnl -------------------------------------------------------------------------
|
||||
@@ -55,17 +48,13 @@ dnl -------------------------------------------------------------------------
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
echo "/* edit configure.in to change version number */" >> php_version.h.new
|
||||
echo "#define PHP_MAJOR_VERSION $MAJOR_VERSION" >> php_version.h.new
|
||||
echo "#define PHP_MINOR_VERSION $MINOR_VERSION" >> php_version.h.new
|
||||
echo "#define PHP_RELEASE_VERSION $RELEASE_VERSION" >> php_version.h.new
|
||||
echo "#define PHP_EXTRA_VERSION \"$EXTRA_VERSION\"" >> php_version.h.new
|
||||
echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
|
||||
cmp php_version.h.new php_version.h >/dev/null 2>&1
|
||||
if test $? -ne 0 ; then
|
||||
rm -f php_version.h && mv php_version.h.new php_version.h && \
|
||||
echo 'Updated php_version.h'
|
||||
else
|
||||
rm -f php_version.h.new
|
||||
rm -f php_version.h.new
|
||||
fi
|
||||
|
||||
|
||||
@@ -81,47 +70,11 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
|
||||
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
|
||||
fi
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
BSD_MAKEFILE=no
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
|
||||
enable_libgcc=yes
|
||||
fi
|
||||
;;
|
||||
*dgux*)
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
|
||||
*darwin*|*rhapsody*)
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp";;
|
||||
*bsdi*)
|
||||
BSD_MAKEFILE=yes;;
|
||||
*beos*)
|
||||
beos_threads=1
|
||||
LIBS="$LIBS -lbe -lroot";;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
dnl Settings we want to make before the checks.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
cwd=`pwd`
|
||||
|
||||
PHP_INIT_BUILD_SYSTEM
|
||||
|
||||
php_shtool=$srcdir/build/shtool
|
||||
T_MD=`$php_shtool echo -n -e %B`
|
||||
T_ME=`$php_shtool echo -n -e %b`
|
||||
@@ -129,15 +82,10 @@ T_ME=`$php_shtool echo -n -e %b`
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
test -z "$CFLAGS" && auto_cflags=1
|
||||
|
||||
dnl AC_AIX needs to be before any macros that run the C compiler.
|
||||
AC_AIX
|
||||
|
||||
abs_srcdir=`(cd $srcdir; pwd)`
|
||||
abs_builddir=`pwd`
|
||||
|
||||
php_abs_top_srcdir=$abs_srcdir
|
||||
php_abs_top_builddir=$abs_builddir
|
||||
|
||||
dnl Because ``make install'' is often performed by the superuser,
|
||||
dnl we create the libs subdirectory as the user who configures PHP.
|
||||
dnl Otherwise, the current user will not be able to delete libs
|
||||
@@ -146,42 +94,44 @@ dnl or the contents of libs.
|
||||
$php_shtool mkdir -p libs
|
||||
rm -f libs/*
|
||||
|
||||
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile main/Makefile sapi/cli/Makefile)
|
||||
|
||||
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C_O
|
||||
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
|
||||
dnl AC_PROG_CC_STDC
|
||||
AC_PROG_CPP
|
||||
AC_AIX
|
||||
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
|
||||
AM_PROG_CC_STDC
|
||||
dnl AC_PROG_CXX
|
||||
dnl AC_PROG_CXXCPP
|
||||
dnl check for -R, etc. switch
|
||||
AC_MSG_CHECKING([whether compiler supports -R])
|
||||
AC_CACHE_VAL(php_cv_cc_dashr,[
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS="-R /usr/lib $LIBS"
|
||||
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
|
||||
LIBS=$SAVE_LIBS
|
||||
])
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS="-R /usr/lib $LIBS"
|
||||
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
|
||||
LIBS=$SAVE_LIBS])
|
||||
AC_MSG_RESULT([$php_cv_cc_dashr])
|
||||
if test $php_cv_cc_dashr = "yes"; then
|
||||
ld_runpath_switch=-R
|
||||
ld_runpath_switch=-R
|
||||
else
|
||||
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
|
||||
AC_CACHE_VAL(php_cv_cc_rpath, [
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS="-Wl,-rpath,/usr/lib $LIBS"
|
||||
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
|
||||
LIBS=$SAVE_LIBS
|
||||
])
|
||||
AC_MSG_RESULT([$php_cv_cc_rpath])
|
||||
if test $php_cv_cc_rpath = "yes"; then
|
||||
ld_runpath_switch=-Wl,-rpath,
|
||||
else
|
||||
dnl something innocuous
|
||||
ld_runpath_switch=-L
|
||||
fi
|
||||
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
|
||||
AC_CACHE_VAL(php_cv_cc_rpath,[
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS="-Wl,-rpath,/usr/lib $LIBS"
|
||||
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
|
||||
LIBS=$SAVE_LIBS])
|
||||
AC_MSG_RESULT([$php_cv_cc_rpath])
|
||||
if test $php_cv_cc_rpath = "yes"; then
|
||||
ld_runpath_switch=-Wl,-rpath,
|
||||
else
|
||||
dnl something innocuous
|
||||
ld_runpath_switch=-L
|
||||
fi
|
||||
fi
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_LN_S
|
||||
@@ -211,6 +161,36 @@ if test "$ac_cv_c_const" = "yes" ; then
|
||||
fi
|
||||
|
||||
|
||||
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
|
||||
|
||||
BSD_MAKEFILE=no
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
|
||||
enable_libgcc=yes
|
||||
fi
|
||||
;;
|
||||
*dgux*)
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
|
||||
*darwin*|*rhapsody*)
|
||||
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
|
||||
*bsdi*)
|
||||
BSD_MAKEFILE=yes;;
|
||||
*beos*)
|
||||
beos_threads=1
|
||||
LIBS="$LIBS -lbe -lroot";;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
|
||||
esac
|
||||
|
||||
|
||||
dnl Include Zend and TSRM configurations.
|
||||
dnl -------------------------------------------------------------------------
|
||||
@@ -235,7 +215,7 @@ dnl -------------------------------------------------------------------------
|
||||
PTHREADS_CHECK
|
||||
PHP_HELP_SEPARATOR([SAPI modules:])
|
||||
PHP_SHLIB_SUFFIX_NAME
|
||||
PHP_SAPI=default
|
||||
PHP_SAPI=cgi
|
||||
PHP_BUILD_PROGRAM
|
||||
|
||||
|
||||
@@ -253,10 +233,6 @@ PHP_CONFIGURE_PART(Configuring SAPI modules)
|
||||
|
||||
esyscmd(./scripts/config-stubs sapi)
|
||||
|
||||
if test "$PHP_SAPI" = "default"; then
|
||||
PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for chosen SAPI module])
|
||||
AC_MSG_RESULT([$PHP_SAPI])
|
||||
|
||||
@@ -266,6 +242,7 @@ if test "$enable_experimental_zts" = "yes"; then
|
||||
fi
|
||||
|
||||
|
||||
|
||||
divert(3)
|
||||
|
||||
dnl ## In diversion 3 we check for compile-time options to the PHP
|
||||
@@ -307,18 +284,10 @@ AC_CHECK_LIB(socket, socket, [
|
||||
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
|
||||
dnl to avoid -lnsl checks, if we already have the functions which
|
||||
dnl are usually in libnsl
|
||||
dnl Also, uClibc will bark at linking with glibc's libnsl.
|
||||
|
||||
unset ac_cv_func_gethostname
|
||||
unset ac_cv_func_yp_get_default_domain
|
||||
AC_CHECK_FUNC(gethostname, [
|
||||
php_no_nsl_checks=yes
|
||||
],[
|
||||
AC_CHECK_FUNC(yp_get_default_domain, [
|
||||
php_no_nsl_checks=yes
|
||||
])
|
||||
])
|
||||
unset ac_cv_func_gethostname
|
||||
AC_CHECK_FUNC(yp_get_default_domain,
|
||||
[php_no_nsl_checks=yes],[])
|
||||
unset ac_cv_func_yp_get_default_domain
|
||||
|
||||
if test "$php_no_nsl_checks" != "yes"; then
|
||||
@@ -374,9 +343,9 @@ AC_HEADER_STDC
|
||||
|
||||
dnl In QNX opendir resides in libc but dirent.h is still required
|
||||
if test "`uname -s 2>/dev/null`" != "QNX"; then
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_DIRENT
|
||||
else
|
||||
AC_CHECK_HEADERS(dirent.h)
|
||||
AC_CHECK_HEADERS(dirent.h)
|
||||
fi
|
||||
PHP_MISSING_FCLOSE_DECL
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
@@ -385,7 +354,6 @@ ApplicationServices/ApplicationServices.h \
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser.h \
|
||||
assert.h \
|
||||
crypt.h \
|
||||
fcntl.h \
|
||||
grp.h \
|
||||
@@ -393,7 +361,6 @@ ieeefp.h \
|
||||
langinfo.h \
|
||||
limits.h \
|
||||
locale.h \
|
||||
mach-o/dyld.h \
|
||||
netinet/in.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
@@ -406,7 +373,6 @@ sysexits.h \
|
||||
sys/file.h \
|
||||
sys/mman.h \
|
||||
sys/mount.h \
|
||||
sys/poll.h \
|
||||
sys/resource.h \
|
||||
sys/select.h \
|
||||
sys/socket.h \
|
||||
@@ -421,7 +387,6 @@ sys/wait.h \
|
||||
unistd.h \
|
||||
unix.h \
|
||||
utime.h \
|
||||
sys/utsname.h \
|
||||
)
|
||||
|
||||
|
||||
@@ -444,10 +409,10 @@ AC_STRUCT_ST_BLKSIZE
|
||||
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
|
||||
dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument
|
||||
if test "`uname -s 2>/dev/null`" != "QNX"; then
|
||||
AC_STRUCT_ST_BLOCKS
|
||||
AC_STRUCT_ST_BLOCKS
|
||||
else
|
||||
AC_MSG_WARN([warnings level for cc set to 0])
|
||||
WARNING_LEVEL=0
|
||||
AC_MSG_WARN([warnings level for cc set to 0])
|
||||
WARNING_LEVEL=0
|
||||
fi
|
||||
AC_STRUCT_ST_RDEV
|
||||
|
||||
@@ -634,20 +599,20 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
|
||||
fi
|
||||
|
||||
# compatibility
|
||||
if test -z "$with_pear" && test "$enable_pear" = "no"; then
|
||||
with_pear=no
|
||||
if test "x$with_pear" = "x" -a "x$enable_pear" = "xno"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(pear, [whether to install PEAR, and where],
|
||||
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
|
||||
--without-pear Do not install PEAR], DEFAULT)
|
||||
|
||||
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
|
||||
install_pear="install-pear install-build install-headers install-programs"
|
||||
if test "$PHP_PEAR" != "no"; then
|
||||
PEAR_DIR=pear
|
||||
PEAR_INSTALLDIR=$PHP_PEAR
|
||||
fi
|
||||
|
||||
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
|
||||
if test "$PHP_PEAR" = "DEFAULT" -o "x$PHP_PEAR" = "xyes"; then
|
||||
case $PHP_LAYOUT in
|
||||
GNU) PEAR_INSTALLDIR=$datadir/pear;;
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
@@ -671,27 +636,29 @@ AC_ARG_WITH(exec-dir,
|
||||
defaults to /usr/local/php/bin],
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
if test "$withval" = "yes"; then
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
|
||||
AC_MSG_RESULT([$withval])
|
||||
fi
|
||||
if test "$withval" = "yes"; then
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
|
||||
AC_MSG_RESULT([$withval])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
fi
|
||||
],[
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
|
||||
AC_MSG_RESULT([/usr/local/php/bin])
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(openssl,for OpenSSL support,
|
||||
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
if test "$PHP_OPENSSL" != "no"; then
|
||||
ext_openssl_shared=$ext_shared
|
||||
PHP_SETUP_OPENSSL
|
||||
fi
|
||||
|
||||
@@ -788,6 +755,9 @@ PHP_CONFIGURE_PART(Configuring extensions)
|
||||
# reading config stubs
|
||||
esyscmd(./scripts/config-stubs ext)
|
||||
|
||||
PHP_FAST_OUTPUT(sapi/$PHP_SAPI/Makefile)
|
||||
|
||||
|
||||
|
||||
dnl Other settings.
|
||||
dnl -------------------------------------------------------------------------
|
||||
@@ -818,17 +788,28 @@ unset with_pic
|
||||
case $php_build_target in
|
||||
program|static)
|
||||
standard_libtool_flag='-prefer-non-pic -static'
|
||||
if test -z "$PHP_MODULES"; then
|
||||
if test "$lib_build_shared" != "yes"; then
|
||||
enable_shared=no
|
||||
fi
|
||||
PHP_COMPILE='$(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c $< && touch $@'
|
||||
CXX_PHP_COMPILE='$(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c $< && touch $@'
|
||||
;;
|
||||
shared)
|
||||
enable_static=no
|
||||
standard_libtool_flag=-prefer-pic
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$PHP_SAPI" = "cgi"; then
|
||||
PHP_PROGRAM=php
|
||||
fi
|
||||
|
||||
if test "$PHP_SAPI" = "fastcgi"; then
|
||||
PHP_PROGRAM=php
|
||||
fi
|
||||
|
||||
|
||||
PHP_REGEX
|
||||
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
|
||||
@@ -913,16 +894,16 @@ if test -z "$EXTENSION_DIR"; then
|
||||
part2=non-zts
|
||||
fi
|
||||
extbasedir=$part1-$part2-$extbasedir
|
||||
EXTENSION_DIR=$libdir/extensions/$extbasedir
|
||||
EXTENSION_DIR=$libdir/extensions/$extbasedir
|
||||
else
|
||||
if test "$enable_experimental_zts" = "yes"; then
|
||||
extbasedir=$extbasedir-zts
|
||||
fi
|
||||
|
||||
if test "$PHP_DEBUG" = "1"; then
|
||||
extbasedir=$extbasedir-debug
|
||||
fi
|
||||
EXTENSION_DIR=$libdir/$extbasedir
|
||||
if test "$enable_experimental_zts" = "yes"; then
|
||||
extbasedir=$extbasedir-zts
|
||||
fi
|
||||
|
||||
if test "$PHP_DEBUG" = "1"; then
|
||||
extbasedir=$extbasedir-debug
|
||||
fi
|
||||
EXTENSION_DIR=$libdir/$extbasedir
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -965,26 +946,23 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
|
||||
PHP_OS=`uname`
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
|
||||
|
||||
if test "$disable_cli" != "1"; then
|
||||
PHP_CLI_TARGET=sapi/cli/php
|
||||
PHP_INSTALL_CLI_TARGET="install-cli"
|
||||
PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli)
|
||||
if test "$disable_cli" = "1"; then
|
||||
CLI_DIR=
|
||||
else
|
||||
CLI_DIR=sapi/cli
|
||||
fi
|
||||
|
||||
PHP_SUBST(PHP_CLI_TARGET)
|
||||
PHP_SUBST(PHP_SAPI_OBJS)
|
||||
PHP_SUBST(PHP_CLI_OBJS)
|
||||
PHP_SUBST(PHP_GLOBAL_OBJS)
|
||||
|
||||
PHP_SUBST(PHP_MODULES)
|
||||
PHP_SUBST(CLI_DIR)
|
||||
|
||||
PHP_SUBST(EXT_SUBDIRS)
|
||||
PHP_SUBST(EXT_STATIC)
|
||||
PHP_SUBST(EXT_SHARED)
|
||||
PHP_SUBST(EXT_LIBS)
|
||||
PHP_SUBST(EXT_LTLIBS)
|
||||
PHP_SUBST(EXT_CLI_LTLIBS)
|
||||
|
||||
PHP_SUBST_OLD(abs_builddir)
|
||||
PHP_SUBST_OLD(abs_srcdir)
|
||||
PHP_SUBST_OLD(php_abs_top_builddir)
|
||||
PHP_SUBST_OLD(php_abs_top_srcdir)
|
||||
|
||||
PHP_SUBST(bindir)
|
||||
PHP_SUBST(exec_prefix)
|
||||
PHP_SUBST(includedir)
|
||||
@@ -1013,8 +991,7 @@ PHP_SUBST_OLD(EXTENSION_DIR)
|
||||
PHP_SUBST(EXTRA_LDFLAGS)
|
||||
PHP_SUBST_OLD(EXTRA_LIBS)
|
||||
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
|
||||
PHP_SUBST_OLD(INCLUDES)
|
||||
PHP_SUBST_OLD(EXTRA_INCLUDES)
|
||||
PHP_SUBST(INCLUDES)
|
||||
PHP_SUBST_OLD(INCLUDE_PATH)
|
||||
PHP_SUBST_OLD(INSTALL_IT)
|
||||
PHP_SUBST(LEX)
|
||||
@@ -1023,15 +1000,16 @@ PHP_SUBST(LFLAGS)
|
||||
PHP_SUBST(LIBTOOL)
|
||||
PHP_SUBST(LN_S)
|
||||
PHP_SUBST_OLD(NATIVE_RPATHS)
|
||||
PHP_SUBST(PEAR_DIR)
|
||||
PHP_SUBST_OLD(PEAR_INSTALLDIR)
|
||||
PHP_SUBST(PHP_BUILD_DATE)
|
||||
PHP_SUBST(PHP_COMPILE)
|
||||
PHP_SUBST_OLD(PHP_LDFLAGS)
|
||||
PHP_SUBST_OLD(PHP_LIBS)
|
||||
PHP_SUBST(OVERALL_TARGET)
|
||||
PHP_SUBST(PHP_PROGRAM)
|
||||
PHP_SUBST(PHP_RPATHS)
|
||||
PHP_SUBST(PHP_SAPI)
|
||||
PHP_SUBST_OLD(PHP_VERSION)
|
||||
PHP_SUBST(PHP_VERSION)
|
||||
PHP_SUBST(PROG_SENDMAIL)
|
||||
PHP_SUBST(SHELL)
|
||||
PHP_SUBST(SHARED_LIBTOOL)
|
||||
@@ -1039,7 +1017,6 @@ PHP_SUBST(TSRM_DIR)
|
||||
PHP_SUBST(TSRM_LIB)
|
||||
PHP_SUBST(WARNING_LEVEL)
|
||||
PHP_SUBST_OLD(YACC)
|
||||
PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
|
||||
|
||||
old_CC=$CC
|
||||
|
||||
@@ -1060,9 +1037,9 @@ if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
|
||||
fi
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
PHP_SET_LIBTOOL_VARIABLE([--silent])
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
fi
|
||||
|
||||
|
||||
@@ -1076,80 +1053,33 @@ PHP_CONFIGURE_PART(Generating files)
|
||||
|
||||
CXXFLAGS_CLEAN=$CXXFLAGS
|
||||
CFLAGS_CLEAN=$CFLAGS
|
||||
CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
|
||||
CFLAGS="$CFLAGS $standard_libtool_flag"
|
||||
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
|
||||
|
||||
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
|
||||
install_targets="install-sapi install-modules $PHP_INSTALL_CLI_TARGET $install_pear"
|
||||
PHP_SUBST(all_targets)
|
||||
PHP_SUBST(install_targets)
|
||||
|
||||
PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
|
||||
|
||||
PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
|
||||
safe_mode.c fopen_wrappers.c alloca.c \
|
||||
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
|
||||
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
|
||||
streams.c network.c php_open_temporary_file.c php_logos.c \
|
||||
output.c memory_streams.c user_streams.c)
|
||||
PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
|
||||
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
|
||||
|
||||
PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \
|
||||
zend_ini_parser.c zend_ini_scanner.c)
|
||||
|
||||
PHP_ADD_SOURCES(Zend, \
|
||||
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
|
||||
zend_execute_API.c zend_highlight.c zend_llist.c \
|
||||
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c zend_qsort.c zend_multibyte.c)
|
||||
|
||||
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
|
||||
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c)
|
||||
fi
|
||||
|
||||
dnl Selectively disable optimization due to high RAM usage during
|
||||
dnl compiling the executor.
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
flag=-O0
|
||||
else
|
||||
flag=
|
||||
fi
|
||||
|
||||
PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
|
||||
|
||||
PHP_ADD_BUILD_DIR(main)
|
||||
PHP_ADD_BUILD_DIR(regex)
|
||||
PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli)
|
||||
PHP_ADD_BUILD_DIR(TSRM)
|
||||
PHP_ADD_BUILD_DIR(Zend)
|
||||
|
||||
|
||||
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
|
||||
PHP_GEN_GLOBAL_MAKEFILE
|
||||
PHP_GEN_CONFIG_VARS
|
||||
|
||||
$php_shtool mkdir -p pear/scripts
|
||||
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
|
||||
pear/scripts/phpize pear/scripts/php-config \
|
||||
$PHP_OUTPUT_FILES"
|
||||
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
|
||||
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config \
|
||||
pear/scripts/pearize pear/scripts/phptar \
|
||||
TSRM/Makefile $PHP_OUTPUT_FILES"
|
||||
|
||||
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
|
||||
|
||||
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
|
||||
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
|
||||
REDO_ALL=yes
|
||||
fi
|
||||
|
||||
if test -n "\$REDO_ALL"; then
|
||||
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
|
||||
fi
|
||||
|
||||
if test ! -f $srcdir/ext/bcmath/number.c; then
|
||||
echo "creating number.c"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
|
||||
echo "creating number.h"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
|
||||
echo "creating number.c"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
|
||||
echo "creating number.h"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
|
||||
fi
|
||||
|
||||
################################################################
|
||||
@@ -1188,6 +1118,33 @@ dnl else
|
||||
dnl rm -f main/internal_functions.c.old
|
||||
dnl fi
|
||||
|
||||
|
||||
# experimental things
|
||||
if test $PHP_SAPI = "apache2filter" ; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| *** WARNING *** |"
|
||||
echo "| |"
|
||||
echo "| Apache 2 Support is EXPERIMENTAL and should NOT be used in |"
|
||||
echo "| production environment. Before submitting bug reports, try the |"
|
||||
echo "| latest CVS snapshot from http://snaps.php.net |"
|
||||
fi
|
||||
|
||||
if test "$PHP_OVERLOAD" != "no"; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| *** WARNING *** |"
|
||||
echo "| |"
|
||||
echo "| The overload extension is highly EXPERIMENTAL and will most |"
|
||||
echo "| certainly change in newer versions. You have been warned! |"
|
||||
fi
|
||||
|
||||
if test "$PHP_AGGREGATE" != "no"; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| *** WARNING *** |"
|
||||
echo "| |"
|
||||
echo "| The aggregate functions are highly EXPERIMENTAL and will most |"
|
||||
echo "| certainly change in newer versions. You have been warned! |"
|
||||
fi
|
||||
|
||||
if test $UNAME = "FreeBSD" && test $PHP_SAPI = "apache2filter" && test $TSRM_PTH != "pth-config" ; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| *** WARNING *** |"
|
||||
@@ -1239,7 +1196,7 @@ cat <<X
|
||||
X
|
||||
fi
|
||||
|
||||
if test "$MYSQL_MODULE_TYPE" = "builtin" && test "$PHP_SAPI" != "cgi" && test "$PHP_SAPI" != "cli"; then
|
||||
if test "$MYSQL_MODULE_TYPE" = "builtin" ; then
|
||||
cat <<X
|
||||
+--------------------------------------------------------------------+
|
||||
| *** WARNING *** |
|
||||
@@ -1300,6 +1257,7 @@ cat<<X
|
||||
+--------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
Thank you for using PHP.
|
||||
|
||||
X
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
|
||||
|
||||
AC_DEFUN(LIB_SHARED_CONVENIENCE,[
|
||||
lib_target="\$(LTLIBRARY_NAME)"
|
||||
cat >>$1<<EOF
|
||||
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
|
||||
AC_DEFUN(LIB_SHARED_MODULE,[
|
||||
lib_target="\$(LTLIBRARY_SHARED_NAME)"
|
||||
cat >>$1<<EOF
|
||||
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
|
||||
\$(SHARED_LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
|
||||
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
|
||||
|
||||
EOF
|
||||
])
|
||||
|
||||
AC_DEFUN(LIB_STATIC_CONVENIENCE,[
|
||||
lib_target="\$(LTLIBRARY_NAME)"
|
||||
cat >>$1<<EOF
|
||||
\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
|
||||
\$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
|
||||
dnl LIB_BUILD(path, shared, convenience)
|
||||
dnl sets up path to build a shared/static convenience/module
|
||||
AC_DEFUN(LIB_BUILD,[
|
||||
lib_makefile="$1/libs.mk"
|
||||
lib_target=""
|
||||
|
||||
$php_shtool mkdir -p $1
|
||||
if test "$BSD_MAKEFILE" = "yes"; then
|
||||
lib_include_conf=".include \"\$(top_builddir)/config_vars.mk\""
|
||||
else
|
||||
lib_include_conf="include \$(top_builddir)/config_vars.mk"
|
||||
fi
|
||||
cat >$lib_makefile<<EOF
|
||||
$lib_include_conf
|
||||
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
|
||||
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
|
||||
EOF
|
||||
|
||||
if test "$2" = "shared" || test "$2" = "yes"; then
|
||||
lib_build_shared=yes
|
||||
if test -n "$3"; then
|
||||
dnl ---------------------------------------- Shared Convenience
|
||||
LIB_SHARED_CONVENIENCE($lib_makefile)
|
||||
else
|
||||
dnl ---------------------------------------- Shared Module
|
||||
LIB_SHARED_MODULE($lib_makefile)
|
||||
fi
|
||||
else
|
||||
dnl ---------------------------------------- Static Convenience = Static Module
|
||||
LIB_STATIC_CONVENIENCE($lib_makefile)
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------- Generate build targets
|
||||
if test -n "$lib_target"; then
|
||||
cat >>$lib_makefile<<EOF
|
||||
targets = $lib_target
|
||||
EOF
|
||||
fi
|
||||
])
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
SUBDIRS = $(EXT_SUBDIRS)
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
LTLIBRARY_NAME = libaspell.la
|
||||
LTLIBRARY_SOURCES = aspell.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -21,7 +21,7 @@ AC_ARG_WITH(aspell,
|
||||
fi
|
||||
AC_DEFINE(HAVE_ASPELL,1,[Whether you have aspell])
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_NEW_EXTENSION(aspell, aspell.c)
|
||||
PHP_EXTENSION(aspell)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
LTLIBRARY_NAME = libbcmath.la
|
||||
LTLIBRARY_SOURCES = bcmath.c number.c
|
||||
LTLIBRARY_SHARED_NAME = bcmath.la
|
||||
LTLIBRARY_DEPENDENCIES = libbcmath/libbcmath.la
|
||||
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
|
||||
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
|
||||
|
||||
SUBDIRS = libbcmath
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_bcmath.h"
|
||||
#include "ext/bcmath/libbcmath/src/bcmath.h"
|
||||
#include "libbcmath/src/bcmath.h"
|
||||
|
||||
function_entry bcmath_functions[] = {
|
||||
PHP_FE(bcadd, NULL)
|
||||
|
||||
@@ -7,11 +7,8 @@ PHP_ARG_ENABLE(bcmath, whether to enable bc style precision math functions,
|
||||
|
||||
if test "$PHP_BCMATH" != "no"; then
|
||||
AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
|
||||
PHP_NEW_EXTENSION(bcmath, bcmath.c number.c \
|
||||
libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
|
||||
libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
|
||||
libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
|
||||
libbcmath/src/rmzero.c libbcmath/src/str2num.c,
|
||||
$ext_shared,,-I@ext_srcdir@/libbcmath/src)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libbcmath/src)
|
||||
PHP_EXTENSION(bcmath, $ext_shared)
|
||||
PHP_FAST_OUTPUT($ext_builddir/libbcmath/Makefile $ext_builddir/libbcmath/src/Makefile)
|
||||
LIB_BUILD($ext_builddir/libbcmath,$ext_shared,yes)
|
||||
LIB_BUILD($ext_builddir/libbcmath/src,$ext_shared,yes)
|
||||
fi
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
LTLIBRARY_NAME = libbcmath.la
|
||||
LTLIBRARY_DEPENDENCIES = src/libbcmath.la
|
||||
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
|
||||
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -0,0 +1,3 @@
|
||||
# Documentation makefile
|
||||
|
||||
MAINTAINERCLEANFILES= Makefile.in
|
||||
@@ -0,0 +1,171 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Documentation makefile
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps doc/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1 @@
|
||||
./" bcmath library documentation
|
||||
@@ -0,0 +1,7 @@
|
||||
LTLIBRARY_NAME = libbcmath.la
|
||||
LTLIBRARY_SOURCES = add.c div.c init.c neg.c outofmem.c raisemod.c rt.c sub.c \
|
||||
compare.c divmod.c int2num.c num2long.c output.c recmul.c \
|
||||
sqrt.c zero.c debug.c doaddsub.c nearzero.c num2str.c raise.c \
|
||||
rmzero.c str2num.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -0,0 +1,6 @@
|
||||
# $Source$
|
||||
# $Id$
|
||||
|
||||
define_option enable-bcmath 'Enable bc style precision math functions' yesno \
|
||||
yes \
|
||||
' Enables bc style arbitrary precision math functions.'
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
LTLIBRARY_NAME = libcalendar.la
|
||||
LTLIBRARY_SOURCES = calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c
|
||||
LTLIBRARY_SHARED_NAME = calendar.la
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -127,11 +127,7 @@ PHP_MINIT_FUNCTION(calendar)
|
||||
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);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ PHP_ARG_ENABLE(calendar,whether to enable calendar conversion support,
|
||||
|
||||
if test "$PHP_CALENDAR" = "yes"; then
|
||||
AC_DEFINE(HAVE_CALENDAR,1,[ ])
|
||||
PHP_NEW_EXTENSION(calendar, calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c, $ext_shared)
|
||||
PHP_EXTENSION(calendar, $ext_shared)
|
||||
fi
|
||||
+21
-20
@@ -29,35 +29,36 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
|
||||
|
||||
/* based on code by Simon Kershaw, <webmaster@ely.anglican.org> */
|
||||
|
||||
struct tm te;
|
||||
pval *year_arg;
|
||||
struct tm *ta, te;
|
||||
time_t the_time;
|
||||
long year, golden, solar, lunar, pfm, dom, tmp, easter;
|
||||
long method = CAL_EASTER_DEFAULT;
|
||||
|
||||
/* Default to the current year if year parameter is not given */
|
||||
{
|
||||
time_t a;
|
||||
struct tm b;
|
||||
time(&a);
|
||||
php_localtime_r(&a, &b);
|
||||
year = 1900 + b.tm_year;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"|ll", &year, &method) == FAILURE) {
|
||||
return;
|
||||
switch(ZEND_NUM_ARGS()) {
|
||||
case 0:
|
||||
the_time = time(NULL);
|
||||
ta = localtime(&the_time);
|
||||
year = ta->tm_year + 1900;
|
||||
break;
|
||||
case 1:
|
||||
if (getParameters(ht, 1, &year_arg) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_long(year_arg);
|
||||
year = Z_LVAL_P(year_arg);
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */
|
||||
php_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
|
||||
php3_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
golden = (year % 19) + 1; /* the Golden number */
|
||||
|
||||
if ((year <= 1582 && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
|
||||
(year >= 1583 && year <= 1752 && method != CAL_EASTER_ROMAN && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
|
||||
method == CAL_EASTER_ALWAYS_JULIAN) { /* JULIAN CALENDAR */
|
||||
|
||||
if ( year <= 1752 ) { /* JULIAN CALENDAR */
|
||||
dom = (year + (year/4) + 5) % 7; /* the "Dominical number" - finding a Sunday */
|
||||
if (dom < 0) {
|
||||
dom += 7;
|
||||
@@ -125,7 +126,7 @@ PHP_FUNCTION(easter_date)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int easter_days([int year, [int method]])
|
||||
/* {{{ proto int easter_days([int year])
|
||||
Return the number of days after March 21 that Easter falls on for a given year (defaults to current year) */
|
||||
PHP_FUNCTION(easter_days)
|
||||
{
|
||||
|
||||
@@ -32,19 +32,4 @@ PHP_FUNCTION(cal_info);
|
||||
|
||||
#define phpext_calendar_ptr calendar_module_ptr
|
||||
|
||||
/*
|
||||
* Specifying the easter calculation method
|
||||
*
|
||||
* DEFAULT is Anglican, ie. use Julian calendar before 1753
|
||||
* and Gregorian after that. With ROMAN, the cutoff year is 1582.
|
||||
* ALWAYS_GREGORIAN and ALWAYS_JULIAN force the calendar
|
||||
* regardless of date.
|
||||
*
|
||||
*/
|
||||
|
||||
#define CAL_EASTER_DEFAULT 0
|
||||
#define CAL_EASTER_ROMAN 1
|
||||
#define CAL_EASTER_ALWAYS_GREGORIAN 2
|
||||
#define CAL_EASTER_ALWAYS_JULIAN 3
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libccvs.la
|
||||
LTLIBRARY_SOURCES = ccvs.c
|
||||
LTLIBRARY_SHARED_NAME = ccvs.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CCVS_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -22,6 +22,6 @@ if test "$PHP_CCVS" != "no"; then
|
||||
|
||||
PHP_ADD_INCLUDE($CCVS_DIR/include)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(ccvs, $CCVS_DIR/lib, CCVS_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(ccvs, ccvs.c, $ext_shared)
|
||||
PHP_EXTENSION(ccvs, $ext_shared)
|
||||
PHP_SUBST(CCVS_SHARED_LIBADD)
|
||||
fi
|
||||
+12
-13
@@ -1,28 +1,27 @@
|
||||
1) Multi-dimenstional array support
|
||||
-- done 2) IErrorInfo
|
||||
-- done 13) export VARIANT through the COM module
|
||||
14) trap exceptions and errors
|
||||
3) WithEvents
|
||||
4) Documentation (internal and user) and howtos
|
||||
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
|
||||
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
|
||||
7) Test component (goes with the docs)
|
||||
8) Test suite (Needs test component)
|
||||
9) reduce the need for VARIANT()
|
||||
10) lets try if we are able to call non IDispatch - only Typelib components
|
||||
|
||||
-- delayed till PHP5: 3) WithEvents
|
||||
-- delayed till PHP5: 9) reduce the need for VARIANT()
|
||||
|
||||
ad 6.) check vbsample.php (new VARIANT(*, *|VT_BYREF)) GPs
|
||||
|
||||
-- done 2) IErrorInfo
|
||||
-- done 6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
|
||||
-- done 11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
|
||||
-- done 12) VARIANT->value as lvalue
|
||||
-- done 13) export VARIANT through the COM module
|
||||
-- done 14) trap exceptions and errors
|
||||
|
||||
-- donne ad 4.) faq (i've collected a few questions from various lists)
|
||||
|
||||
ad 6.) check vbsample.php (new VARIANT(*, *|VT_BYREF)) GPs
|
||||
ad 4.) faq (i've collected a few questions from various lists)
|
||||
variant attributes !!
|
||||
|
||||
to be discussed:
|
||||
|
||||
- dcom inporc issue
|
||||
- mts support (getcontext)
|
||||
- adsi support (ads* functions)
|
||||
|
||||
-- delayed till PHP 5: try serialisation support (if component implements IPersist)
|
||||
- winapi interface
|
||||
- try serialisation support (if component implements IPersist)
|
||||
@@ -660,7 +660,6 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
|
||||
ZVAL_NULL(pval_arg);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case VT_DATE: {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
LTLIBRARY_NAME = libcpdf.la
|
||||
LTLIBRARY_SOURCES = cpdf.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+2
-2
@@ -9,7 +9,7 @@ AC_ARG_WITH(cpdflib,
|
||||
AC_MSG_RESULT(no) ;;
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c)
|
||||
PHP_EXTENSION(cpdf)
|
||||
AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])],
|
||||
[AC_MSG_ERROR([Cpdf module requires cpdflib >= 2.])])
|
||||
PHP_ADD_LIBRARY(cpdf)
|
||||
@@ -20,7 +20,7 @@ AC_ARG_WITH(cpdflib,
|
||||
test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE=$withval/include
|
||||
if test -n "$CPDFLIB_INCLUDE" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c)
|
||||
PHP_EXTENSION(cpdf)
|
||||
old_LIBS=$LIBS
|
||||
old_withval=$withval
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
crack
|
||||
Alexander Feldman
|
||||
Windows Port:
|
||||
Joseph Tate
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libcrack.la
|
||||
LTLIBRARY_SOURCES = crack.c
|
||||
LTLIBRARY_SHARED_NAME = crack.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CRACK_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -26,7 +26,7 @@ if test "$PHP_CRACK" != "no"; then
|
||||
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
|
||||
|
||||
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
|
||||
PHP_EXTENSION(crack, $ext_shared)
|
||||
PHP_SUBST(CRACK_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CRACK, 1, [ ])
|
||||
fi
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="crack" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=crack - Win32 Release_TS
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "crack.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "crack.mak" CFG="crack - Win32 Release_TS"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "crack - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "crack - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "crack - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CRACK" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "CRACK_EXPORTS" /D "COMPILE_DL_CRACK" /D ZTS=1 /D HAVE_CRACK=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
# ADD RSC /l 0x406 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# 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 cracklib_Win32.lib wsock32.lib php4ts.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_crack.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "crack - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CRACK" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CRACK_EXPORTS" /D "COMPILE_DL_CRACK" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CRACK=1 /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
# ADD RSC /l 0x406 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# 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 cracklib_Win32.lib php4ts_debug.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_crack.dll" /libpath:"..\..\Debug_TS"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "crack - Win32 Release_TS"
|
||||
# Name "crack - Win32 Debug_TS"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\crack.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\php_crack.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libctype.la
|
||||
LTLIBRARY_SOURCES = ctype.c
|
||||
LTLIBRARY_SHARED_NAME = ctype.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CTYPE_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -7,5 +7,5 @@ PHP_ARG_ENABLE(ctype, whether to enable ctype functions,
|
||||
|
||||
if test "$PHP_CTYPE" != "no"; then
|
||||
AC_DEFINE(HAVE_CTYPE, 1, [ ])
|
||||
PHP_NEW_EXTENSION(ctype, ctype.c, $ext_shared)
|
||||
PHP_EXTENSION(ctype, $ext_shared)
|
||||
fi
|
||||
+1
-1
@@ -84,7 +84,7 @@ ZEND_GET_MODULE(ctype)
|
||||
PHP_MINFO_FUNCTION(ctype)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "ctype functions", "enabled");
|
||||
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+21
-28
@@ -6,22 +6,17 @@ ctype on strings
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
setlocale(LC_ALL,"C");
|
||||
|
||||
setlocale(LC_ALL,"C");
|
||||
print "LOCALE is '" . setlocale(LC_ALL,0) . "'\n";
|
||||
|
||||
function ctype_test_002($function) {
|
||||
$n1 = $n2 = $n3 = 0;
|
||||
// test portable POSIX characters 0..127
|
||||
for ($a=0;$a<128;$a++) {
|
||||
$c = chr($a);
|
||||
if($function($a)) $n1++;
|
||||
if($function("$c$c$c")) $n2++;
|
||||
if($function("1-$c$c$c-x")) $n3++;
|
||||
}
|
||||
print "$function $n1 $n2 $n3\n";
|
||||
}
|
||||
|
||||
function ctype_test_002($function) {
|
||||
$n=0; $m=0;
|
||||
for($a=0;$a<256;$a++) {
|
||||
$c = chr($a);
|
||||
if($function("$c$c$c")) $n++;
|
||||
if($function("1-$c$c$c-x")) $m++;
|
||||
}
|
||||
echo "$function $n $m\n";
|
||||
}
|
||||
ctype_test_002("ctype_lower");
|
||||
ctype_test_002("ctype_upper");
|
||||
ctype_test_002("ctype_alpha");
|
||||
@@ -33,18 +28,16 @@ ctype_test_002("ctype_print");
|
||||
ctype_test_002("ctype_punct");
|
||||
ctype_test_002("ctype_space");
|
||||
ctype_test_002("ctype_xdigit");
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
LOCALE is 'C'
|
||||
ctype_lower 26 26 0
|
||||
ctype_upper 26 26 0
|
||||
ctype_alpha 52 52 0
|
||||
ctype_digit 10 10 0
|
||||
ctype_alnum 62 62 0
|
||||
ctype_cntrl 33 33 0
|
||||
ctype_graph 94 94 94
|
||||
ctype_print 95 95 95
|
||||
ctype_punct 32 32 0
|
||||
ctype_space 6 6 0
|
||||
ctype_xdigit 22 22 0
|
||||
ctype_lower 26 0
|
||||
ctype_upper 26 0
|
||||
ctype_alpha 52 0
|
||||
ctype_digit 10 0
|
||||
ctype_alnum 62 0
|
||||
ctype_cntrl 33 0
|
||||
ctype_graph 94 94
|
||||
ctype_print 95 95
|
||||
ctype_punct 32 0
|
||||
ctype_space 6 0
|
||||
ctype_xdigit 22 0
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
LTLIBRARY_NAME = libcurl.la
|
||||
LTLIBRARY_SOURCES = curl.c
|
||||
LTLIBRARY_SHARED_NAME = curl.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CURL_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -57,6 +57,6 @@ if test "$PHP_CURL" != "no"; then
|
||||
$CURL_LIBS -L$CURL_DIR/lib
|
||||
])
|
||||
|
||||
PHP_NEW_EXTENSION(curl, curl.c, $ext_shared)
|
||||
PHP_EXTENSION(curl, $ext_shared)
|
||||
PHP_SUBST(CURL_SHARED_LIBADD)
|
||||
fi
|
||||
+8
-15
@@ -553,7 +553,7 @@ static void alloc_curl_handle(php_curl **ch)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto resource curl_init([string url])
|
||||
/* {{{ proto int curl_init([string url])
|
||||
Initialize a CURL session */
|
||||
PHP_FUNCTION(curl_init)
|
||||
{
|
||||
@@ -602,7 +602,7 @@ PHP_FUNCTION(curl_init)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool curl_setopt(resource ch, string option, mixed value)
|
||||
/* {{{ proto bool curl_setopt(int ch, string option, mixed value)
|
||||
Set an option for a CURL transfer */
|
||||
PHP_FUNCTION(curl_setopt)
|
||||
{
|
||||
@@ -692,14 +692,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
case CURLOPT_WRITEHEADER:
|
||||
case CURLOPT_STDERR: {
|
||||
FILE *fp = NULL;
|
||||
int type;
|
||||
void * what;
|
||||
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
|
||||
ZEND_VERIFY_RESOURCE(what);
|
||||
|
||||
if (FAILURE == php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS))
|
||||
RETURN_FALSE;
|
||||
ZEND_FETCH_RESOURCE(fp, FILE *, zvalue, -1, "File-Handle", php_file_le_fopen());
|
||||
if (!fp) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -866,7 +859,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool curl_exec(resource ch)
|
||||
/* {{{ proto bool curl_exec(int ch)
|
||||
Perform a CURL session */
|
||||
PHP_FUNCTION(curl_exec)
|
||||
{
|
||||
@@ -902,7 +895,7 @@ PHP_FUNCTION(curl_exec)
|
||||
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), v);
|
||||
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), v, 1);
|
||||
|
||||
/* {{{ proto string curl_getinfo(resource ch, int opt)
|
||||
/* {{{ proto string curl_getinfo(int ch, int opt)
|
||||
Get information regarding a specific transfer */
|
||||
PHP_FUNCTION(curl_getinfo)
|
||||
{
|
||||
@@ -1002,7 +995,7 @@ PHP_FUNCTION(curl_getinfo)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string curl_error(resource ch)
|
||||
/* {{{ proto string curl_error(int ch)
|
||||
Return a string contain the last error for the current session */
|
||||
PHP_FUNCTION(curl_error)
|
||||
{
|
||||
@@ -1020,7 +1013,7 @@ PHP_FUNCTION(curl_error)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int curl_errno(resource ch)
|
||||
/* {{{ proto int curl_errno(int ch)
|
||||
Return an integer containing the last error number */
|
||||
PHP_FUNCTION(curl_errno)
|
||||
{
|
||||
@@ -1037,7 +1030,7 @@ PHP_FUNCTION(curl_errno)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void curl_close(resource ch)
|
||||
/* {{{ proto void curl_close(int ch)
|
||||
Close a CURL session */
|
||||
PHP_FUNCTION(curl_close)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
LTLIBRARY_NAME = libcybercash.la
|
||||
LTLIBRARY_SOURCES = cybercash.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -12,7 +12,7 @@ AC_ARG_WITH(cybercash,
|
||||
test -f $withval/c-api/mckcrypt.h && MCK_DIR=$withval/c-api
|
||||
if test -n "$MCK_DIR"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_NEW_EXTENSION(cybercash, cybercash.c)
|
||||
PHP_EXTENSION(cybercash)
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$LIBS -L$MCK_DIR/lib"
|
||||
AC_CHECK_LIB(mckcrypto,base64_encode,[AC_DEFINE(HAVE_MCK,1,[ ])],
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libcybermut.la
|
||||
LTLIBRARY_SOURCES = cybermut.c
|
||||
LTLIBRARY_SHARED_NAME = cybermut.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CYBERMUT_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -44,5 +44,5 @@ if test "$PHP_CYBERMUT" != "no"; then
|
||||
AC_DEFINE(HAVE_CYBERMUT, 1, [ ])
|
||||
|
||||
|
||||
PHP_NEW_EXTENSION(cybermut, cybermut.c, $ext_shared)
|
||||
PHP_EXTENSION(cybermut, $ext_shared)
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libcyrus.la
|
||||
LTLIBRARY_SOURCES = cyrus.c
|
||||
LTLIBRARY_SHARED_NAME = cyrus.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(CYRUS_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -43,5 +43,5 @@ if test "$PHP_CYRUS" != "no"; then
|
||||
|
||||
AC_DEFINE(HAVE_CYRUS,1,[ ])
|
||||
|
||||
PHP_NEW_EXTENSION(cyrus, cyrus.c, $ext_shared)
|
||||
PHP_EXTENSION(cyrus, $ext_shared)
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
LTLIBRARY_NAME = libdb.la
|
||||
LTLIBRARY_SOURCES = db.c
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -54,5 +54,5 @@ if test "$PHP_DB" != "no"; then
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DBM_LIB"
|
||||
fi
|
||||
|
||||
PHP_NEW_EXTENSION(db, db.c)
|
||||
PHP_EXTENSION(db)
|
||||
fi
|
||||
+16
-44
@@ -439,7 +439,6 @@ PHP_FUNCTION(dbmclose)
|
||||
*/
|
||||
void php_dbm_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
int ret = 0;
|
||||
dbm_info *info = (dbm_info *)rsrc->ptr;
|
||||
DBM_TYPE dbf;
|
||||
int lockfd;
|
||||
@@ -491,46 +490,12 @@ PHP_FUNCTION(dbminsert)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ret = php_dbm_insert(info, Z_STRVAL_P(key), Z_STRVAL_P(value) TSRMLS_CC);
|
||||
ret = php_dbm_insert_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value), 0 TSRMLS_CC);
|
||||
RETURN_LONG(ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ php_dbm_insert
|
||||
*/
|
||||
int php_dbm_insert(dbm_info *info, char *key, char *value TSRMLS_DC) {
|
||||
datum key_datum, value_datum;
|
||||
int ret;
|
||||
DBM_TYPE dbf;
|
||||
|
||||
php_stripslashes(key, NULL TSRMLS_CC);
|
||||
php_stripslashes(value, NULL TSRMLS_CC);
|
||||
|
||||
value_datum.dptr = estrdup(value);
|
||||
value_datum.dsize = strlen(value);
|
||||
|
||||
key_datum.dptr = estrdup(key);
|
||||
key_datum.dsize = strlen(key);
|
||||
#if GDBM_FIX
|
||||
key_datum.dsize++;
|
||||
#endif
|
||||
|
||||
dbf = info->dbf;
|
||||
if (!dbf) {
|
||||
php_error(E_WARNING, "Unable to locate dbm file");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_INSERT);
|
||||
|
||||
/* free the memory */
|
||||
efree(key_datum.dptr); efree(value_datum.dptr);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dbmreplace(int dbm_identifier, string key, string value)
|
||||
Replaces the value for a key in a dbm database */
|
||||
PHP_FUNCTION(dbmreplace)
|
||||
@@ -551,28 +516,31 @@ PHP_FUNCTION(dbmreplace)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ret = php_dbm_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value) TSRMLS_CC);
|
||||
ret = php_dbm_insert_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value), 1 TSRMLS_CC);
|
||||
RETURN_LONG(ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_dbm_replace
|
||||
*/
|
||||
int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC)
|
||||
int php_dbm_insert_replace(dbm_info *info, char *key, char *value, int replace_mode TSRMLS_DC)
|
||||
{
|
||||
DBM_TYPE dbf;
|
||||
int ret;
|
||||
datum key_datum, value_datum;
|
||||
|
||||
key = estrdup(key);
|
||||
value = estrdup(value);
|
||||
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
php_stripslashes(key, NULL TSRMLS_CC);
|
||||
php_stripslashes(value, NULL TSRMLS_CC);
|
||||
}
|
||||
|
||||
value_datum.dptr = estrdup(value);
|
||||
value_datum.dptr = value;
|
||||
value_datum.dsize = strlen(value);
|
||||
|
||||
key_datum.dptr = estrdup(key);
|
||||
key_datum.dptr = key;
|
||||
key_datum.dsize = strlen(key);
|
||||
#if GDBM_FIX
|
||||
key_datum.dsize++;
|
||||
@@ -580,12 +548,16 @@ int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC)
|
||||
|
||||
dbf = info->dbf;
|
||||
if (!dbf) {
|
||||
php_error(E_WARNING, "Unable to locate dbm file");
|
||||
return 1;
|
||||
php_error(E_WARNING, "%s(): Unable to locate dbm file", get_active_function_name(TSRMLS_C));
|
||||
ret = 1;
|
||||
} else {
|
||||
if (!replace_mode) {
|
||||
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_INSERT);
|
||||
} else {
|
||||
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_REPLACE);
|
||||
|
||||
/* free the memory */
|
||||
efree(key_datum.dptr); efree(value_datum.dptr);
|
||||
|
||||
|
||||
+1
-2
@@ -54,9 +54,8 @@ typedef struct dbm_info {
|
||||
dbm_info *php_find_dbm(pval *id TSRMLS_DC);
|
||||
void php_dbm_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC);
|
||||
int php_dbm_insert(dbm_info *info, char *key, char *value TSRMLS_DC);
|
||||
char *php_dbm_fetch(dbm_info *info, char *key TSRMLS_DC);
|
||||
int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC);
|
||||
int php_dbm_insert_replace(dbm_info *info, char *key, char *value, int insert_mode TSRMLS_DC);
|
||||
int php_dbm_exists(dbm_info *info, char *key);
|
||||
int php_dbm_delete(dbm_info *info, char *key);
|
||||
char *php_dbm_first_key(dbm_info *info);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
LTLIBRARY_NAME = libdba.la
|
||||
LTLIBRARY_SOURCES = dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c \
|
||||
dba_ndbm.c dba_db3.c
|
||||
LTLIBRARY_SHARED_NAME = dba.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(DBA_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+3
-6
@@ -152,10 +152,7 @@ AC_ARG_WITH(db3,
|
||||
[ --with-db3[=DIR] Include Berkeley DB3 support],[
|
||||
if test "$withval" != "no"; then
|
||||
for i in /usr/local /usr /usr/local/BerkeleyDB.3.0 $withval; do
|
||||
if test -f "$i/include/db3/db.h"; then
|
||||
THIS_PREFIX=$i
|
||||
DB3_EXTRA=db3/db.h
|
||||
elif test -f "$i/include/db.h" ; then
|
||||
if test -f "$i/include/db.h" ; then
|
||||
THIS_PREFIX=$i
|
||||
DB3_EXTRA=db.h
|
||||
fi
|
||||
@@ -165,7 +162,7 @@ AC_ARG_WITH(db3,
|
||||
AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ])
|
||||
fi
|
||||
|
||||
for LIB in db-3 db3 db; do
|
||||
for LIB in db db-3 db3; do
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
|
||||
AC_CHECK_LIB($LIB, db_create, [AC_DEFINE(DBA_DB3,1,[ ]) THIS_LIBS=$LIB])
|
||||
])
|
||||
@@ -229,7 +226,7 @@ AC_MSG_CHECKING(whether to enable DBA interface)
|
||||
if test "$HAVE_DBA" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DBA, 1, [ ])
|
||||
PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db3.c, $ext_shared)
|
||||
PHP_EXTENSION(dba,$ext_shared)
|
||||
PHP_SUBST(DBA_SHARED_LIBADD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
+46
-39
@@ -35,9 +35,9 @@
|
||||
|
||||
#define DB2_DATA dba_db2_data *dba = info->dbf
|
||||
#define DB2_GKEY \
|
||||
DBT gkey = {0}; \
|
||||
gkey.data = (char *) key; \
|
||||
gkey.size = keylen
|
||||
DBT gkey; \
|
||||
memset(&gkey, 0, sizeof(gkey)); \
|
||||
gkey.data = (char *) key; gkey.size = keylen
|
||||
|
||||
typedef struct {
|
||||
DB *dbp;
|
||||
@@ -53,7 +53,7 @@ DBA_OPEN_FUNC(db2)
|
||||
struct stat check_stat;
|
||||
int s = VCWD_STAT(info->path, &check_stat);
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
info->mode == DBA_TRUNC ? DB_BTREE :
|
||||
s ? DB_BTREE : DB_UNKNOWN;
|
||||
|
||||
@@ -63,73 +63,75 @@ DBA_OPEN_FUNC(db2)
|
||||
info->mode == DBA_WRITER ? 0 :
|
||||
info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1;
|
||||
|
||||
if (gmode == -1)
|
||||
if(gmode == -1)
|
||||
return FAILURE;
|
||||
|
||||
if (info->argc > 0) {
|
||||
if(info->argc > 0) {
|
||||
convert_to_long_ex(info->argv[0]);
|
||||
filemode = Z_LVAL_PP(info->argv[0]);
|
||||
}
|
||||
|
||||
if (db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
|
||||
return FAILURE;
|
||||
if(!db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
|
||||
info->dbf = malloc(sizeof(dba_db2_data));
|
||||
memset(info->dbf, 0, sizeof(dba_db2_data));
|
||||
((dba_db2_data *) info->dbf)->dbp = dbp;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
info->dbf = calloc(sizeof(dba_db2_data), 1);
|
||||
((dba_db2_data *) info->dbf)->dbp = dbp;
|
||||
return SUCCESS;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
DBA_CLOSE_FUNC(db2)
|
||||
{
|
||||
DB2_DATA;
|
||||
|
||||
if (dba->cursor)
|
||||
dba->cursor->c_close(dba->cursor);
|
||||
if(dba->cursor) dba->cursor->c_close(dba->cursor);
|
||||
dba->dbp->close(dba->dbp, 0);
|
||||
free(dba);
|
||||
}
|
||||
|
||||
DBA_FETCH_FUNC(db2)
|
||||
{
|
||||
DBT gval = {0};
|
||||
DBT gval;
|
||||
char *new = NULL;
|
||||
DB2_DATA;
|
||||
DB2_GKEY;
|
||||
|
||||
if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
|
||||
return NULL;
|
||||
memset(&gval, 0, sizeof(gval));
|
||||
if(!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
|
||||
if(newlen) *newlen = gval.size;
|
||||
new = estrndup(gval.data, gval.size);
|
||||
}
|
||||
|
||||
if (newlen) *newlen = gval.size;
|
||||
return estrndup(gval.data, gval.size);
|
||||
return new;
|
||||
}
|
||||
|
||||
DBA_UPDATE_FUNC(db2)
|
||||
{
|
||||
DBT gval = {0};
|
||||
DBT gval;
|
||||
DB2_DATA;
|
||||
DB2_GKEY;
|
||||
|
||||
memset(&gval, 0, sizeof(gval));
|
||||
gval.data = (char *) val;
|
||||
gval.size = vallen;
|
||||
|
||||
if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
|
||||
if(!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
|
||||
mode == 1 ? DB_NOOVERWRITE : 0)) {
|
||||
return FAILURE;
|
||||
return SUCCESS;
|
||||
}
|
||||
return SUCCESS;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
DBA_EXISTS_FUNC(db2)
|
||||
{
|
||||
DBT gval = {0};
|
||||
DBT gval;
|
||||
DB2_DATA;
|
||||
DB2_GKEY;
|
||||
|
||||
if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
|
||||
return FAILURE;
|
||||
memset(&gval, 0, sizeof(gval));
|
||||
if(!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
|
||||
return SUCCESS;
|
||||
}
|
||||
return SUCCESS;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
DBA_DELETE_FUNC(db2)
|
||||
@@ -144,15 +146,15 @@ DBA_FIRSTKEY_FUNC(db2)
|
||||
{
|
||||
DB2_DATA;
|
||||
|
||||
if (dba->cursor) {
|
||||
if(dba->cursor) {
|
||||
dba->cursor->c_close(dba->cursor);
|
||||
dba->cursor = NULL;
|
||||
}
|
||||
|
||||
dba->cursor = NULL;
|
||||
#if (DB_VERSION_MAJOR > 2) || (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR > 6) || (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 6 && DB_VERSION_PATCH >= 4)
|
||||
if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
|
||||
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
|
||||
#else
|
||||
if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
|
||||
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
@@ -164,14 +166,19 @@ DBA_FIRSTKEY_FUNC(db2)
|
||||
DBA_NEXTKEY_FUNC(db2)
|
||||
{
|
||||
DB2_DATA;
|
||||
DBT gkey = {0}, gval = {0};
|
||||
DBT gkey, gval;
|
||||
char *nkey = NULL;
|
||||
|
||||
memset(&gkey, 0, sizeof(gkey));
|
||||
memset(&gval, 0, sizeof(gval));
|
||||
|
||||
if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)
|
||||
|| !gkey.data)
|
||||
return NULL;
|
||||
|
||||
if (newlen) *newlen = gkey.size;
|
||||
return estrndup(gkey.data, gkey.size);
|
||||
if(!dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)) {
|
||||
if(gkey.data) {
|
||||
nkey = estrndup(gkey.data, gkey.size);
|
||||
if(newlen) *newlen = gkey.size;
|
||||
}
|
||||
}
|
||||
return nkey;
|
||||
}
|
||||
|
||||
DBA_OPTIMIZE_FUNC(db2)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# $Source$
|
||||
# $Id$
|
||||
|
||||
define_option with-dba 'dba support?' yesnodir no \
|
||||
' Whether to build the dba extension.'
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
LTLIBRARY_NAME = libdbase.la
|
||||
LTLIBRARY_SOURCES = dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c
|
||||
LTLIBRARY_SHARED_NAME = dbase.la
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
+1
-1
@@ -9,5 +9,5 @@ PHP_ARG_ENABLE(dbase,whether to enable dbase support,
|
||||
|
||||
if test "$PHP_DBASE" = "yes"; then
|
||||
AC_DEFINE(DBASE,1,[ ])
|
||||
PHP_NEW_EXTENSION(dbase, dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c, $ext_shared)
|
||||
PHP_EXTENSION(dbase, $ext_shared)
|
||||
fi
|
||||
@@ -0,0 +1,4 @@
|
||||
# $Id$ -*- sh -*-
|
||||
|
||||
define_option with-dbase 'dBase support? ' yesno no \
|
||||
' Whether to use the bundled dbase library.'
|
||||
@@ -1,2 +1,2 @@
|
||||
mime_magic
|
||||
dbplus
|
||||
Hartmut Holzgraefe
|
||||
@@ -0,0 +1,5 @@
|
||||
this extension is experimental,
|
||||
its functions may change their names
|
||||
or move to extension all together
|
||||
so do not rely to much on them
|
||||
you have been warned!
|
||||
@@ -0,0 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
LTLIBRARY_NAME = libdbplus.la
|
||||
LTLIBRARY_SOURCES = dbplus.c php_dbplus.c
|
||||
LTLIBRARY_SHARED_NAME = dbplus.la
|
||||
LTLIBRARY_SHARED_LIBADD = $(DBPLUS_SHARED_LIBADD)
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
@@ -0,0 +1,3 @@
|
||||
experimental db++ extension
|
||||
for more information on db++ see
|
||||
http://www.concept-asa.de
|
||||
@@ -0,0 +1,47 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(dbplus, for dbplus support,
|
||||
[ --with-dbplus Include dbplus support])
|
||||
|
||||
if test "$PHP_DBPLUS" != "no"; then
|
||||
# --with-dbplus -> check with-path
|
||||
SEARCH_PATH="/usr/dbplus /usr/local/dbplus /opt/dbplus"
|
||||
SEARCH_FOR="/include/dbconfig.h"
|
||||
if test -r $PHP_DBPLUS/; then # path given as parameter
|
||||
DBPLUS_DIR=$PHP_DBPLUS
|
||||
else # search default path list
|
||||
AC_MSG_CHECKING(for dbplus files in default path)
|
||||
for i in $SEARCH_PATH ; do
|
||||
if test -r $i/$SEARCH_FOR; then
|
||||
DBPLUS_DIR=$i
|
||||
AC_MSG_RESULT(found in $i)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$DBPLUS_DIR"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_MSG_ERROR(Please reinstall the dbplus distribution)
|
||||
fi
|
||||
|
||||
# --with-dbplus -> add include path
|
||||
AC_ADD_INCLUDE($DBPLUS_DIR/include)
|
||||
|
||||
# --with-dbplus -> chech for lib and symbol presence
|
||||
LIBNAME=Ddb
|
||||
LIBSYMBOL=Db_Init
|
||||
old_LIBS=$LIBS
|
||||
LIBS="-L$DBPLUS_DIR/lib -lm -ldl -lDmacc -lDracc"
|
||||
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_DBPLUSLIB,1,[ ])],
|
||||
[AC_MSG_ERROR(wrong dbplus lib version or lib not found)])
|
||||
LIBS=$old_LIBS
|
||||
|
||||
PHP_SUBST(DBPLUS_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(Dmacc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(Dracc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
|
||||
|
||||
PHP_EXTENSION(dbplus, $ext_shared)
|
||||
fi
|
||||
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2002 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Hartmut Holzgraefe <hartmut@six.de> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "php.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_dbplus.h"
|
||||
|
||||
#include <saccess.h>
|
||||
#include <relation.h>
|
||||
#include <dblight.h>
|
||||
|
||||
|
||||
/* If you declare any globals in php_dbplus.h uncomment this:
|
||||
ZEND_DECLARE_MODULE_GLOBALS(dbplus)
|
||||
*/
|
||||
|
||||
#ifdef COMPILE_DL_DBPLUS
|
||||
ZEND_GET_MODULE(dbplus)
|
||||
#endif
|
||||
|
||||
|
||||
/* {{{ Resource handling */
|
||||
|
||||
/* True global resources - no need for thread safety here */
|
||||
int le_dbplus_relation;
|
||||
int le_dbplus_tupel;
|
||||
|
||||
void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
relf *conn = (relf *)(rsrc->ptr);
|
||||
|
||||
cdb_close(conn);
|
||||
}
|
||||
|
||||
|
||||
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
tuple *t = (tuple *)(rsrc->ptr);
|
||||
|
||||
efree(t);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ function table */
|
||||
|
||||
/* Every user visible function must have an entry in dbplus_functions[].
|
||||
*/
|
||||
function_entry dbplus_functions[] = {
|
||||
PHP_FE(dbplus_add, NULL)
|
||||
PHP_FE(dbplus_aql, NULL)
|
||||
PHP_FE(dbplus_chdir, NULL)
|
||||
PHP_FE(dbplus_close, NULL)
|
||||
PHP_FE(dbplus_curr, NULL)
|
||||
PHP_FE(dbplus_errno, NULL)
|
||||
PHP_FE(dbplus_errcode, NULL)
|
||||
PHP_FE(dbplus_find, NULL)
|
||||
PHP_FE(dbplus_first, NULL)
|
||||
PHP_FE(dbplus_flush, NULL)
|
||||
PHP_FE(dbplus_freealllocks, NULL)
|
||||
PHP_FE(dbplus_freelock, NULL)
|
||||
PHP_FE(dbplus_freerlocks, NULL)
|
||||
PHP_FE(dbplus_getlock, NULL)
|
||||
PHP_FE(dbplus_getunique, NULL)
|
||||
PHP_FE(dbplus_info, NULL)
|
||||
PHP_FE(dbplus_last, NULL)
|
||||
PHP_FE(dbplus_next, NULL)
|
||||
PHP_FE(dbplus_open, NULL)
|
||||
PHP_FE(dbplus_prev, NULL)
|
||||
PHP_FE(dbplus_rchperm, NULL)
|
||||
PHP_FE(dbplus_rcreate, NULL)
|
||||
PHP_FE(dbplus_rcrtexact, NULL)
|
||||
PHP_FE(dbplus_rcrtlike, NULL)
|
||||
PHP_FE(dbplus_resolve, NULL)
|
||||
PHP_FE(dbplus_restorepos, NULL)
|
||||
PHP_FE(dbplus_rkeys, NULL)
|
||||
PHP_FE(dbplus_ropen, NULL)
|
||||
PHP_FE(dbplus_rquery, NULL)
|
||||
PHP_FE(dbplus_rrename, NULL)
|
||||
PHP_FE(dbplus_rsecindex, NULL)
|
||||
PHP_FE(dbplus_runlink, NULL)
|
||||
PHP_FE(dbplus_rzap, NULL)
|
||||
PHP_FE(dbplus_savepos, NULL)
|
||||
PHP_FE(dbplus_setindex, NULL)
|
||||
PHP_FE(dbplus_setindexbynumber, NULL)
|
||||
PHP_FE(dbplus_sql, NULL)
|
||||
PHP_FE(dbplus_tcl, NULL)
|
||||
PHP_FE(dbplus_tremove, NULL)
|
||||
PHP_FE(dbplus_undo, NULL)
|
||||
PHP_FE(dbplus_undoprepare, NULL)
|
||||
PHP_FE(dbplus_unlockrel, NULL)
|
||||
PHP_FE(dbplus_unselect, NULL)
|
||||
PHP_FE(dbplus_update, NULL)
|
||||
PHP_FE(dbplus_xlockrel, NULL)
|
||||
PHP_FE(dbplus_xunlockrel, NULL)
|
||||
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ module entry */
|
||||
|
||||
zend_module_entry dbplus_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dbplus",
|
||||
dbplus_functions,
|
||||
PHP_MINIT(dbplus),
|
||||
PHP_MSHUTDOWN(dbplus),
|
||||
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
|
||||
PHP_MINFO(dbplus),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ ini parameters */
|
||||
|
||||
/* Remove comments and fill if you need to have entries in php.ini
|
||||
PHP_INI_BEGIN()
|
||||
PHP_INI_END()
|
||||
*/
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ module init */
|
||||
|
||||
PHP_MINIT_FUNCTION(dbplus)
|
||||
{
|
||||
/* resource id for cdb connections */
|
||||
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
|
||||
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
|
||||
|
||||
/* constants for DBPLUS error codes */
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOERR", ERR_NOERR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DUPLICATE", ERR_DUPLICATE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EOSCAN", ERR_EOSCAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EMPTY", ERR_EMPTY, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CLOSE", ERR_CLOSE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WLOCKED", ERR_WLOCKED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LOCKED", ERR_LOCKED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOLOCK", ERR_NOLOCK, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_READ", ERR_READ, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WRITE", ERR_WRITE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CREATE", ERR_CREATE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LSEEK", ERR_LSEEK, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LENGTH", ERR_LENGTH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_OPEN", ERR_OPEN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WOPEN", ERR_WOPEN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MAGIC", ERR_MAGIC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_VERSION", ERR_VERSION, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PGSIZE", ERR_PGSIZE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CRC", ERR_CRC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PIPE", ERR_PIPE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NIDX", ERR_NIDX, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MALLOC", ERR_MALLOC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NUSERS", ERR_NUSERS, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREEXIT", ERR_PREEXIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_ONTRAP", ERR_ONTRAP, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREPROC", ERR_PREPROC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPARSE", ERR_DBPARSE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBRUNERR", ERR_DBRUNERR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPREEXIT", ERR_DBPREEXIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WAIT", ERR_WAIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CORRUPT_TUPLE", ERR_CORRUPT_TUPLE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WARNING0", ERR_WARNING0, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PANIC", ERR_PANIC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_FIFO", ERR_FIFO, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PERM", ERR_PERM, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_TCL", ERR_TCL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_RESTRICTED", ERR_RESTRICTED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_USER", ERR_USER, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_UNKNOWN", ERR_UNKNOWN, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ module shutdown */
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ request init */
|
||||
|
||||
/* Remove if there's nothing to do at request start */
|
||||
PHP_RINIT_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ request shutdown */
|
||||
|
||||
/* Remove if there's nothing to do at request end */
|
||||
PHP_RSHUTDOWN_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ module information */
|
||||
|
||||
PHP_MINFO_FUNCTION(dbplus)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_header(2, "dbplus support", "enabled");
|
||||
php_info_print_table_end();
|
||||
|
||||
/* Remove comments if you have entries in php.ini
|
||||
DISPLAY_INI_ENTRIES();
|
||||
*/
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 926 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user