[Pkg-php-commits] [php/debian-sid] Fix 4-year digit year on big-endian platforms (Closes: #542301)

Ondrej Sury ondrej at howl.office.nic.cz
Wed Aug 26 13:49:42 UTC 2009


---
 .../gentoo/117-4_digit_year_big_endian.patch       |   11 +++++++++++
 debian/patches/series                              |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/gentoo/117-4_digit_year_big_endian.patch

diff --git a/debian/patches/gentoo/117-4_digit_year_big_endian.patch b/debian/patches/gentoo/117-4_digit_year_big_endian.patch
new file mode 100644
index 0000000..04049d1
--- /dev/null
+++ b/debian/patches/gentoo/117-4_digit_year_big_endian.patch
@@ -0,0 +1,11 @@
+--- pkg-php.orig/ext/date/php_date.c
++++ pkg-php/ext/date/php_date.c
+@@ -803,7 +803,7 @@ static char *date_format(char *format, i
+ 			/* year */
+ 			case 'L': length = slprintf(buffer, 32, "%d", timelib_is_leap((int) t->y)); break;
+ 			case 'y': length = slprintf(buffer, 32, "%02d", (int) t->y % 100); break;
+-			case 'Y': length = slprintf(buffer, 32, "%s%04ld", t->y < 0 ? "-" : "", llabs(t->y)); break;
++			case 'Y': length = slprintf(buffer, 32, "%s%04lld", t->y < 0 ? "-" : "", llabs(t->y)); break;
+ 
+ 			/* time */
+ 			case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;
diff --git a/debian/patches/series b/debian/patches/series
index e78f3c5..432dcc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -41,3 +41,4 @@ exif_read_data-segfault.patch
 sybase-alias.patch
 strcmp_null-OnUpdateErrorLog.patch
 check_ini_on_modify_status.patch
+gentoo/117-4_digit_year_big_endian.patch
-- 
1.5.6.5





More information about the Pkg-php-commits mailing list