Re: [PHP4BETA] cvs: /php4 php_compat.h php.h /php4/ext/pcre/pcrelib pcre.h /php4/ext/xml/expat/xmlparse hashtable.c xmlparse.c
/php4/ext/xml/expat/xmltok xmlrole.c xmltok.c
| From: | Sascha Schumann | Date: | Sat, 04 Mar 2000 19:24:31 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4 php_compat.h php.h /php4/ext/pcre/pcrelib pcre.h /php4/ext/xml/expat/xmlparse hashtable.c xmlparse.c /php4/ext/xml/expat/xmltok xmlrole.c xmltok.c |
||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11518@lists.php.net to get a copy of this message | ||
On Sat, Mar 04, 2000 at 07:09:48PM +0200, Andi Gutmans wrote:
> Any reason for adding those php_compat.h includes to the expat files?
Well, look at php_compat.h and you will immediately see its purpose.
Because PHP might be linked with all other kind of software, it is
important that we do not pollute the symbol namespace too much.
The only way to achieve this is to prefix the exported symbols with
an unique identifier. We already did this in the HS regex package.
Apache has done it for years.
For example, the one-line addition to pcrelib fixed a problem on OpenBSD.
There we had link-time problems, because the system libraries already
contained the symbols of the pcre library.
- Sascha