]> git.pld-linux.org Git - packages/php.git/commitdiff
updated systzdata patch from fedora to r9
authorElan Ruusamäe <glen@delfi.ee>
Thu, 23 Aug 2012 07:59:23 +0000 (10:59 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 23 Aug 2012 08:05:01 +0000 (11:05 +0300)
php-systzdata.patch

index 6247aeadf4baaf5add2d8ba9e04662d1ba6f3bab..f841e9bb609264de40e464dc596f0773af4cb02d 100644 (file)
@@ -1,8 +1,9 @@
-
 Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
 History:
+r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold)
+r8: fix compile error without --with-system-tzdata configured
 r7: improve check for valid timezone id to exclude directories
 r6: fix fd leak in r5, fix country code/BC flag use in 
     timezone_identifiers_list() using system db,
@@ -15,9 +16,9 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
 r2: add filesystem trawl to set up name alias index
 r1: initial revision
 
---- php-5.3.1/ext/date/lib/parse_tz.c.systzdata
-+++ php-5.3.1/ext/date/lib/parse_tz.c
-@@ -20,6 +20,16 @@
+--- a/ext/date/lib/parse_tz.c
++++ b/ext/date/lib/parse_tz.c
+@@ -24,6 +24,16 @@
  
  #include "timelib.h"
  
@@ -34,7 +35,7 @@ r1: initial revision
  #include <stdio.h>
  
  #ifdef HAVE_LOCALE_H
-@@ -31,7 +41,12 @@
+@@ -35,7 +45,12 @@
  #else
  #include <strings.h>
  #endif
@@ -47,7 +48,7 @@ r1: initial revision
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -51,9 +66,14 @@
+@@ -55,9 +70,14 @@
  
  static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
  {
@@ -65,7 +66,7 @@ r1: initial revision
        /* read BC flag */
        tz->bc = (**tzf == '\1');
        *tzf += 1;
-@@ -253,7 +273,397 @@ void timelib_dump_tzinfo(timelib_tzinfo 
+@@ -260,7 +280,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
        }
  }
  
@@ -464,7 +465,7 @@ r1: initial revision
  {
        int left = 0, right = tzdb->index_size - 1;
  #ifdef HAVE_SETLOCALE
-@@ -292,36 +702,125 @@ static int seek_to_tz_position(const uns
+@@ -299,36 +709,128 @@ static int seek_to_tz_position(const uns
        return 0;
  }
  
@@ -472,6 +473,7 @@ r1: initial revision
 +                             char **map, size_t *maplen,
 +                             const timelib_tzdb *tzdb)
 +{
++#ifdef HAVE_SYSTEM_TZDATA
 +      if (tzdb == timezonedb_system) {
 +              char *orig;
 +
@@ -485,7 +487,9 @@ r1: initial revision
 +                
 +                return 1;
 +      }
-+      else {
++       else
++#endif
++       {
 +              return inmem_seek_to_tz_position(tzf, timezone, tzdb);
 +      }
 +}
@@ -584,17 +588,17 @@ r1: initial revision
 +
 +                      /* Now done with the mmap segment - discard it. */
 +                      munmap(memmap, maplen);
++              } else
 +#endif
-+              }
-+              else {
++              {
 +                      /* PHP-style - use the embedded info. */
 +                      read_location(&tzf, tmp);
 +              }
        } else {
                tmp = NULL;
        }
---- php-5.3.1/ext/date/lib/timelib.m4.systzdata
-+++ php-5.3.1/ext/date/lib/timelib.m4
+--- a/ext/date/lib/timelib.m4
++++ b/ext/date/lib/timelib.m4
 @@ -78,3 +78,17 @@ stdlib.h
  
  dnl Check for strtoll, atoll
This page took 0.055074 seconds and 4 git commands to generate.