diff options
Diffstat (limited to 'ext/calendar')
-rw-r--r-- | ext/calendar/calendar.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 2e0f53e561..1e4ad3dfde 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -24,10 +24,6 @@ #include "config.h" #endif -#ifdef PHP_WIN32 -#define _WINNLS_ -#endif - #include "php.h" #include "ext/standard/info.h" #include "php_calendar.h" @@ -35,6 +31,12 @@ #include <stdio.h> +#ifdef PHP_WIN32 +/* This conflicts with a define in winnls.h, but that header is needed + to have GetACP(). */ +#undef CAL_GREGORIAN +#endif + /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_unixtojd, 0, 0, 0) ZEND_ARG_INFO(0, timestamp) @@ -311,7 +313,7 @@ PHP_FUNCTION(cal_info) if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) { - php_error_docref(NULL, E_WARNING, "invalid calendar ID %pd.", cal); + php_error_docref(NULL, E_WARNING, "invalid calendar ID " ZEND_LONG_FMT ".", cal); RETURN_FALSE; } @@ -333,7 +335,7 @@ PHP_FUNCTION(cal_days_in_month) } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL, E_WARNING, "invalid calendar ID %pd.", cal); + php_error_docref(NULL, E_WARNING, "invalid calendar ID " ZEND_LONG_FMT ".", cal); RETURN_FALSE; } @@ -379,7 +381,7 @@ PHP_FUNCTION(cal_to_jd) } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL, E_WARNING, "invalid calendar ID %pd.", cal); + php_error_docref(NULL, E_WARNING, "invalid calendar ID " ZEND_LONG_FMT ".", cal); RETURN_FALSE; } @@ -401,7 +403,7 @@ PHP_FUNCTION(cal_from_jd) } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL, E_WARNING, "invalid calendar ID %pd", cal); + php_error_docref(NULL, E_WARNING, "invalid calendar ID " ZEND_LONG_FMT "", cal); RETURN_FALSE; } calendar = &cal_conversion_table[cal]; |