summaryrefslogtreecommitdiff
path: root/ext/tidy/tidy.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 18:04:24 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-18 00:37:18 +0200
commitbc9497695e8d3a9fbb0a3d806598bab91926b3aa (patch)
tree6322fdf9d2bb22377ffd407f421a8bd000a8f28b /ext/tidy/tidy.c
parent714c5f0b702ff9c3b575013a3b6f24d03e78fe8d (diff)
downloadphp-git-bc9497695e8d3a9fbb0a3d806598bab91926b3aa.tar.gz
Fix [-Wundef] warning in Tidy extension
Diffstat (limited to 'ext/tidy/tidy.c')
-rw-r--r--ext/tidy/tidy.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index b9f9c3502a..7084883ecf 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -21,18 +21,18 @@
#include "php.h"
#include "php_tidy.h"
-#if HAVE_TIDY
+#ifdef HAVE_TIDY
#include "php_ini.h"
#include "ext/standard/info.h"
-#if HAVE_TIDY_H
+#ifdef HAVE_TIDY_H
#include "tidy.h"
-#elif HAVE_TIDYP_H
+#elif defined(HAVE_TIDYP_H)
#include "tidyp.h"
#endif
-#if HAVE_TIDYBUFFIO_H
+#ifdef HAVE_TIDYBUFFIO_H
#include "tidybuffio.h"
#else
#include "buffio.h"
@@ -865,12 +865,12 @@ static PHP_MINFO_FUNCTION(tidy)
{
php_info_print_table_start();
php_info_print_table_row(2, "Tidy support", "enabled");
-#if HAVE_TIDYBUFFIO_H
+#ifdef HAVE_TIDYBUFFIO_H
php_info_print_table_row(2, "libTidy Version", (char *)tidyLibraryVersion());
-#elif HAVE_TIDYP_H
+#elif defined(HAVE_TIDYP_H)
php_info_print_table_row(2, "libtidyp Version", (char *)tidyVersion());
#endif
-#if HAVE_TIDYRELEASEDATE
+#ifdef HAVE_TIDYRELEASEDATE
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
#endif
php_info_print_table_end();
@@ -1139,7 +1139,7 @@ PHP_FUNCTION(tidy_get_release)
RETURN_THROWS();
}
-#if HAVE_TIDYRELEASEDATE
+#ifdef HAVE_TIDYRELEASEDATE
RETURN_STRING((char *)tidyReleaseDate());
#else
RETURN_STRING((char *)"unknown");
@@ -1148,7 +1148,7 @@ PHP_FUNCTION(tidy_get_release)
/* }}} */
-#if HAVE_TIDYOPTGETDOC
+#ifdef HAVE_TIDYOPTGETDOC
/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
Returns the documentation for the given option name */
PHP_FUNCTION(tidy_get_opt_doc)
@@ -1775,7 +1775,7 @@ static void _php_tidy_register_tags(INIT_FUNC_ARGS)
TIDY_TAG_CONST(VAR);
TIDY_TAG_CONST(WBR);
TIDY_TAG_CONST(XMP);
-# if HAVE_TIDYBUFFIO_H
+# ifdef HAVE_TIDYBUFFIO_H
TIDY_TAG_CONST(ARTICLE);
TIDY_TAG_CONST(ASIDE);
TIDY_TAG_CONST(AUDIO);