Skip to content

Commit ce4316d

Browse files
committed
Fix [-Wundef] warnings in libxml extension
1 parent ef4951e commit ce4316d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/libxml/libxml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "ext/standard/info.h"
2828
#include "ext/standard/file.h"
2929

30-
#if HAVE_LIBXML
30+
#ifdef HAVE_LIBXML
3131

3232
#include <libxml/parser.h>
3333
#include <libxml/parserInternals.h>
@@ -714,7 +714,7 @@ PHP_LIBXML_API void php_libxml_initialize(void)
714714
PHP_LIBXML_API void php_libxml_shutdown(void)
715715
{
716716
if (_php_libxml_initialized) {
717-
#if defined(LIBXML_SCHEMAS_ENABLED)
717+
#ifdef LIBXML_SCHEMAS_ENABLED
718718
xmlRelaxNGCleanupTypes();
719719
#endif
720720
/* xmlCleanupParser(); */
@@ -767,7 +767,7 @@ static PHP_MINIT_FUNCTION(libxml)
767767
REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT);
768768

769769
/* Schema validation options */
770-
#if defined(LIBXML_SCHEMAS_ENABLED)
770+
#ifdef LIBXML_SCHEMAS_ENABLED
771771
REGISTER_LONG_CONSTANT("LIBXML_SCHEMA_CREATE", XML_SCHEMA_VAL_VC_I_CREATE, CONST_CS | CONST_PERSISTENT);
772772
#endif
773773

ext/libxml/php_libxml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef PHP_LIBXML_H
1919
#define PHP_LIBXML_H
2020

21-
#if HAVE_LIBXML
21+
#ifdef HAVE_LIBXML
2222
extern zend_module_entry libxml_module_entry;
2323
#define libxml_module_ptr &libxml_module_entry
2424

0 commit comments

Comments
 (0)