summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-03-04 14:44:01 +0000
committerSascha Schumann <sas@php.net>2000-03-04 14:44:01 +0000
commit315999da94c25341ec19f0fb82b5df2f14671f18 (patch)
tree9bd6880fe3879474a91c02cbbd2d0809d6ad4cdd
parent365f3794359fd9823c2f627c1e05b75933444d4a (diff)
downloadphp-git-315999da94c25341ec19f0fb82b5df2f14671f18.tar.gz
Prefix some symbols with php_
^(pcre|Xml|XML).*
-rw-r--r--ext/pcre/pcrelib/pcre.h2
-rw-r--r--ext/xml/expat/xmlparse/hashtable.c2
-rw-r--r--ext/xml/expat/xmlparse/xmlparse.c2
-rw-r--r--ext/xml/expat/xmltok/xmlrole.c2
-rw-r--r--ext/xml/expat/xmltok/xmltok.c2
-rw-r--r--main/php.h1
-rw-r--r--main/php_compat.h65
7 files changed, 76 insertions, 0 deletions
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index 4888b45257..b7012bcbe0 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -11,6 +11,8 @@
#define PCRE_MINOR 08
#define PCRE_DATE 31-Aug-1999
+#include "php_compat.h"
+
/* Win32 uses DLL by default */
#ifdef _WIN32
diff --git a/ext/xml/expat/xmlparse/hashtable.c b/ext/xml/expat/xmlparse/hashtable.c
index 780a061041..9f9921fb0a 100644
--- a/ext/xml/expat/xmlparse/hashtable.c
+++ b/ext/xml/expat/xmlparse/hashtable.c
@@ -28,6 +28,8 @@ GPL. If you do not delete the provisions above, a recipient may use
your version of this file under either the MPL or the GPL.
*/
+#include "php_compat.h"
+
#include "xmldef.h"
#ifdef XML_UNICODE_WCHAR_T
diff --git a/ext/xml/expat/xmlparse/xmlparse.c b/ext/xml/expat/xmlparse/xmlparse.c
index aba28061d2..3354bcbc96 100644
--- a/ext/xml/expat/xmlparse/xmlparse.c
+++ b/ext/xml/expat/xmlparse/xmlparse.c
@@ -28,6 +28,8 @@ GPL. If you do not delete the provisions above, a recipient may use
your version of this file under either the MPL or the GPL.
*/
+#include "php_compat.h"
+
#include "xmldef.h"
#include "xmlparse.h"
diff --git a/ext/xml/expat/xmltok/xmlrole.c b/ext/xml/expat/xmltok/xmlrole.c
index b18e35eb3c..1a49e5342a 100644
--- a/ext/xml/expat/xmltok/xmlrole.c
+++ b/ext/xml/expat/xmltok/xmlrole.c
@@ -28,6 +28,8 @@ GPL. If you do not delete the provisions above, a recipient may use
your version of this file under either the MPL or the GPL.
*/
+#include "php_compat.h"
+
#include "xmldef.h"
#include "xmlrole.h"
diff --git a/ext/xml/expat/xmltok/xmltok.c b/ext/xml/expat/xmltok/xmltok.c
index d106b1b3a9..487659e94b 100644
--- a/ext/xml/expat/xmltok/xmltok.c
+++ b/ext/xml/expat/xmltok/xmltok.c
@@ -28,6 +28,8 @@ GPL. If you do not delete the provisions above, a recipient may use
your version of this file under either the MPL or the GPL.
*/
+#include "php_compat.h"
+
#include "xmldef.h"
#include "xmltok.h"
#include "nametab.h"
diff --git a/main/php.h b/main/php.h
index e7aa8ce81d..2f8eb29a9d 100644
--- a/main/php.h
+++ b/main/php.h
@@ -32,6 +32,7 @@
#include "php_version.h"
#include "zend.h"
+#include "php_compat.h"
/* automake defines PACKAGE and VERSION for Zend too */
#ifdef PACKAGE
diff --git a/main/php_compat.h b/main/php_compat.h
new file mode 100644
index 0000000000..90b78c1710
--- /dev/null
+++ b/main/php_compat.h
@@ -0,0 +1,65 @@
+#ifndef PHP_COMPAT_H
+#define PHP_COMPAT_H
+
+#if defined(HAVE_BUNDLED_PCRE) || !defined(PHP_VERSION)
+#define pcre_compile php_pcre_compile
+#define pcre_copy_substring php_pcre_copy_substring
+#define pcre_exec php_pcre_exec
+#define pcre_get_substring php_pcre_substring
+#define pcre_get_substring_list php_pcre_get_substring_list
+#define pcre_info php_pcre_info
+#define pcre_maketables php_pcre_maketables
+#define pcre_study php_pcre_study
+#define pcre_version php_pcre_version
+#endif
+
+#define lookup php_lookup
+#define hashTableInit php_hashTableInit
+#define hashTableDestroy php_hashTableDestroy
+#define hashTableIterInit php_hashTableIterInit
+#define hashTableIterNext php_hashTableIterNext
+#define XML_DefaultCurrent php_XML_DefaultCurrent
+#define XML_ErrorString php_XML_ErrorString
+#define XML_ExternalEntityParserCreate php_XML_ExternalEntityParserCreate
+#define XML_GetBase php_XML_GetBase
+#define XML_GetBuffer php_XML_GetBuffer
+#define XML_GetCurrentByteCount php_XML_GetCurrentByteCount
+#define XML_GetCurrentByteIndex php_XML_GetCurrentByteIndex
+#define XML_GetCurrentColumnNumber php_XML_GetCurrentColumnNumber
+#define XML_GetCurrentLineNumber php_XML_GetCurrentLineNumber
+#define XML_GetErrorCode php_XML_GetErrorCode
+#define XML_GetSpecifiedAttributeCount php_XML_GetSpecifiedAttributeCount
+#define XML_Parse php_XML_Parse
+#define XML_ParseBuffer php_XML_ParseBuffer
+#define XML_ParserCreate php_XML_ParserCreate
+#define XML_ParserCreateNS php_XML_ParserCreateNS
+#define XML_ParserFree php_XML_ParserFree
+#define XML_SetBase php_XML_SetBase
+#define XML_SetCdataSectionHandler php_XML_SetCdataSectionHandler
+#define XML_SetCharacterDataHandler php_XML_SetCharacterDataHandler
+#define XML_SetCommentHandler php_XML_SetCommentHandler
+#define XML_SetDefaultHandler php_XML_SetDefaultHandler
+#define XML_SetDefaultHandlerExpand php_XML_SetDefaultHandlerExpand
+#define XML_SetElementHandler php_XML_SetElementHandler
+#define XML_SetEncoding php_XML_SetEncoding
+#define XML_SetExternalEntityRefHandler php_XML_SetExternalEntityRefHandler
+#define XML_SetExternalEntityRefHandlerArg php_XML_SetExternalEntityRefHandlerArg
+#define XML_SetNamespaceDeclHandler php_XML_SetNamespaceDeclHandler
+#define XML_SetNotStandaloneHandler php_XML_SetNotStandaloneHandler
+#define XML_SetNotationDeclHandler php_XML_SetNotationDeclHandler
+#define XML_SetProcessingInstructionHandler php_XML_SetProcessingInstructionHandler
+#define XML_SetUnknownEncodingHandler php_XML_SetUnknownEncodingHandler
+#define XML_SetUnparsedEntityDeclHandler php_XML_SetUnparsedEntityDeclHandler
+#define XML_SetUserData php_XML_SetUserData
+#define XML_UseParserAsHandlerArg php_XML_UseParserAsHandlerArg
+#define XmlGetUtf16InternalEncoding php_XmlGetUtf16InternalEncoding
+#define XmlGetUtf8InternalEncoding php_XmlGetUtf8InternalEncoding
+#define XmlInitEncoding php_XmlInitEncoding
+#define XmlInitUnknownEncoding php_XmlInitUnknownEncoding
+#define XmlParseXmlDecl php_XmlParseXmlDecl
+#define XmlSizeOfUnknownEncoding php_XmlSizeOfUnknownEncoding
+#define XmlUtf16Encode php_XmlUtf16Encode
+#define XmlUtf8Encode php_XmlUtf8Encode
+#define XmlPrologStateInit php_XmlPrologStateInit
+
+#endif