From 19b6ffed3c3b2658ec4f258fed1efad85c6f0340 Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 3 Jul 2005 23:30:52 +0000 Subject: [PATCH] - Always use #ifdef when dealing with HAVE_* defines from AC_CHECK_FUNCS() - Added check for strftime() also in the timelib configure --- ext/date/lib/timelib.m4 | 2 +- ext/date/php_date.c | 8 ++++---- ext/date/php_date.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 index e0a01ae030..c7255727f2 100644 --- a/ext/date/lib/timelib.m4 +++ b/ext/date/lib/timelib.m4 @@ -77,4 +77,4 @@ stdlib.h ]) dnl Check for strtoll, atoll -AC_CHECK_FUNCS(strtoll atoll) +AC_CHECK_FUNCS(strtoll atoll strftime) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 581e0e394a..b5a1b66ccf 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -33,12 +33,12 @@ function_entry date_functions[] = { PHP_FE(date, NULL) PHP_FE(gmdate, NULL) PHP_FE(mktime, NULL) + PHP_FE(gmmktime, NULL) PHP_FE(checkdate, NULL) - PHP_FE(gmstrftime, NULL) -#if HAVE_STRFTIME +#ifdef HAVE_STRFTIME PHP_FE(strftime, NULL) - PHP_FE(gmmktime, NULL) + PHP_FE(gmstrftime, NULL) #endif PHP_FE(time, NULL) @@ -548,7 +548,7 @@ PHP_FUNCTION(checkdate) } /* }}} */ -#if HAVE_STRFTIME +#ifdef HAVE_STRFTIME /* {{{ php_strftime */ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) diff --git a/ext/date/php_date.h b/ext/date/php_date.h index 4fd126b610..d7691cf6b6 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -33,7 +33,7 @@ PHP_FUNCTION(gmmktime); PHP_FUNCTION(checkdate); -#if HAVE_STRFTIME +#ifdef HAVE_STRFTIME PHP_FUNCTION(strftime); PHP_FUNCTION(gmstrftime); #endif -- 2.40.0