Skip to content

Commit 1d9f817

Browse files
committed
Fix [-Wundef] warning in Tidy extension
1 parent 9886f31 commit 1d9f817

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ext/tidy/tidy.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
#include "php.h"
2222
#include "php_tidy.h"
2323

24-
#if HAVE_TIDY
24+
#ifdef HAVE_TIDY
2525

2626
#include "php_ini.h"
2727
#include "ext/standard/info.h"
2828

29-
#if HAVE_TIDY_H
29+
#ifdef HAVE_TIDY_H
3030
#include "tidy.h"
3131
#elif HAVE_TIDYP_H
3232
#include "tidyp.h"
3333
#endif
3434

35-
#if HAVE_TIDYBUFFIO_H
35+
#ifdef HAVE_TIDYBUFFIO_H
3636
#include "tidybuffio.h"
3737
#else
3838
#include "buffio.h"
@@ -865,12 +865,12 @@ static PHP_MINFO_FUNCTION(tidy)
865865
{
866866
php_info_print_table_start();
867867
php_info_print_table_row(2, "Tidy support", "enabled");
868-
#if HAVE_TIDYBUFFIO_H
868+
#ifdef HAVE_TIDYBUFFIO_H
869869
php_info_print_table_row(2, "libTidy Version", (char *)tidyLibraryVersion());
870-
#elif HAVE_TIDYP_H
870+
#elif defined(HAVE_TIDYP_H)
871871
php_info_print_table_row(2, "libtidyp Version", (char *)tidyVersion());
872872
#endif
873-
#if HAVE_TIDYRELEASEDATE
873+
#ifdef HAVE_TIDYRELEASEDATE
874874
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
875875
#endif
876876
php_info_print_table_end();
@@ -1139,7 +1139,7 @@ PHP_FUNCTION(tidy_get_release)
11391139
RETURN_THROWS();
11401140
}
11411141

1142-
#if HAVE_TIDYRELEASEDATE
1142+
#ifdef HAVE_TIDYRELEASEDATE
11431143
RETURN_STRING((char *)tidyReleaseDate());
11441144
#else
11451145
RETURN_STRING((char *)"unknown");
@@ -1148,7 +1148,7 @@ PHP_FUNCTION(tidy_get_release)
11481148
/* }}} */
11491149

11501150

1151-
#if HAVE_TIDYOPTGETDOC
1151+
#ifdef HAVE_TIDYOPTGETDOC
11521152
/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
11531153
Returns the documentation for the given option name */
11541154
PHP_FUNCTION(tidy_get_opt_doc)
@@ -1775,7 +1775,7 @@ static void _php_tidy_register_tags(INIT_FUNC_ARGS)
17751775
TIDY_TAG_CONST(VAR);
17761776
TIDY_TAG_CONST(WBR);
17771777
TIDY_TAG_CONST(XMP);
1778-
# if HAVE_TIDYBUFFIO_H
1778+
# ifdef HAVE_TIDYBUFFIO_H
17791779
TIDY_TAG_CONST(ARTICLE);
17801780
TIDY_TAG_CONST(ASIDE);
17811781
TIDY_TAG_CONST(AUDIO);

0 commit comments

Comments
 (0)