summaryrefslogtreecommitdiff
path: root/ext/xml/php_xml.h
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-02-10 18:03:55 +0000
committerSascha Schumann <sas@php.net>2000-02-10 18:03:55 +0000
commitc59993005c074b25365d97af8c365749aa53b53f (patch)
treeeb57bb267bc2199402bb89e429ae9aa702ab4e06 /ext/xml/php_xml.h
parent0fd89aa20d7a8226e68f13f4418e9183b46acd6e (diff)
downloadphp-git-c59993005c074b25365d97af8c365749aa53b53f.tar.gz
- Fixed ^#[ ]+preprocessor directive$ constructions which break
some compilers - Made php_xml.h useable without having xmltok.h/xmlparse.h in the include path
Diffstat (limited to 'ext/xml/php_xml.h')
-rw-r--r--ext/xml/php_xml.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h
index 98de3c2859..66d7e81741 100644
--- a/ext/xml/php_xml.h
+++ b/ext/xml/php_xml.h
@@ -20,9 +20,20 @@
/* $Id$ */
#ifndef _PHP_XML_H
-# define _PHP_XML_H
+#define _PHP_XML_H
-# if HAVE_LIBEXPAT
+#ifdef HAVE_LIBEXPAT
+
+extern zend_module_entry xml_module_entry;
+#define xml_module_ptr &xml_module_entry
+
+#else
+
+#define xml_module_ptr NULL
+
+#endif
+
+#if defined(HAVE_LIBEXPAT) && defined(PHP_XML_INTERNAL)
#include <xmltok.h>
#include <xmlparse.h>
@@ -35,7 +46,7 @@
#ifdef XML_UNICODE
-# error "UTF-16 Unicode support not implemented!"
+#error "UTF-16 Unicode support not implemented!"
#endif
typedef struct {
@@ -80,9 +91,6 @@ typedef struct {
} xml_encoding;
-extern zend_module_entry xml_module_entry;
-# define xml_module_ptr &xml_module_entry
-
enum php_xml_option {
PHP_XML_OPTION_CASE_FOLDING = 1,
PHP_XML_OPTION_TARGET_ENCODING,
@@ -90,7 +98,7 @@ enum php_xml_option {
PHP_XML_OPTION_SKIP_WHITE
};
-# define RETURN_OUT_OF_MEMORY \
+#define RETURN_OUT_OF_MEMORY \
php_error(E_WARNING, "Out of memory");\
RETURN_FALSE
@@ -122,10 +130,6 @@ PHP_FUNCTION(xml_parse_into_struct);
PHPAPI char *_xml_zval_strdup(zval *val);
-#else /* !HAVE_LIBEXPAT */
-
-# define xml_module_ptr NULL
-
#endif /* HAVE_LIBEXPAT */
#define phpext_xml_ptr xml_module_ptr
@@ -146,7 +150,7 @@ PHPAPI char *_xml_zval_strdup(zval *val);
#define XMLLS_FETCH()
#endif
-# endif /* _PHP_XML_H */
+#endif /* _PHP_XML_H */
/*
* Local variables: