[-]
[+]
|
Changed |
php5.spec
|
|
[-]
[+]
|
Added |
configure.sqlite.patch
^
|
@@ -0,0 +1,12 @@
+diff -Nur configure.orig configure
+--- configure.orig 2009-10-17 12:16:15.000000000 +0200
++++ configure 2009-10-17 12:40:25.000000000 +0200
+@@ -115329,7 +115329,7 @@
+
+ { { $as_echo "$as_me:$LINENO: error: wrong sqlite lib version or lib not found" >&5
+ $as_echo "$as_me: error: wrong sqlite lib version or lib not found" >&2;}
+- { (exit 1); exit 1; }; }
++ { (echo 1); echo 1; }; }
+
+
+ fi
|
[-]
[+]
|
Added |
php-5.2.6-systzdata.patch
^
|
@@ -0,0 +1,307 @@
+
+Add support for use of the system timezone database, rather
+than embedding a copy. Discussed upstream but was not desired.
+
+History:
+r4: added "System/Localtime" tzname which uses /etc/localtime
+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.2.6/ext/date/lib/parse_tz.c.systzdata
++++ php-5.2.6/ext/date/lib/parse_tz.c
+@@ -20,6 +20,16 @@
+
+ #include "timelib.h"
+
++#ifdef HAVE_SYSTEM_TZDATA
++#include <sys/mman.h>
++#include <sys/stat.h>
++#include <limits.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#include "php_scandir.h"
++#endif
++
+ #include <stdio.h>
+
+ #ifdef HAVE_LOCALE_H
+@@ -31,7 +41,10 @@
+ #else
+ #include <strings.h>
+ #endif
++
++#ifndef HAVE_SYSTEM_TZDATA
+ #include "timezonedb.h"
++#endif
+
+ #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
+ # if defined(__LITTLE_ENDIAN__)
+@@ -206,6 +219,211 @@ void timelib_dump_tzinfo(timelib_tzinfo
+ }
+ }
+
++#ifdef HAVE_SYSTEM_TZDATA
++
++#ifdef HAVE_SYSTEM_TZDATA_PREFIX
++#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX
++#else
++#define ZONEINFO_PREFIX "/usr/share/zoneinfo"
++#endif
++
++#define SYSTEM_TZFILE "/etc/localtime"
++
++static const timelib_tzdb *timezonedb_system = NULL;
++
++/* Filter out some non-tzdata files and the posix/right databases, if
++ * present. */
++static int index_filter(const struct dirent *ent)
++{
++ return strcmp(ent->d_name, ".") != 0
++ && strcmp(ent->d_name, "..") != 0
++ && strcmp(ent->d_name, "posix") != 0
++ && strcmp(ent->d_name, "posixrules") != 0
++ && strcmp(ent->d_name, "right") != 0
++ && strstr(ent->d_name, ".tab") == NULL;
++}
++
++/* Create the zone identifier index by trawling the filesystem. */
++static void create_zone_index(timelib_tzdb *db)
++{
++ size_t dirstack_size, dirstack_top;
++ size_t index_size, index_next;
++ timelib_tzdb_index_entry *db_index;
++ char **dirstack;
++
++ /* LIFO stack to hold directory entries to scan; each slot is a
++ * directory name relative to the zoneinfo prefix. */
++ dirstack_size = 32;
++ dirstack = malloc(dirstack_size * sizeof *dirstack);
++ dirstack_top = 1;
++ dirstack[0] = strdup("");
++
++ /* Index array. */
++ index_size = 64;
++ db_index = malloc(index_size * sizeof *db_index);
++ index_next = 0;
++
++ do {
++ struct dirent **ents;
++ char name[PATH_MAX], *top;
++ int count;
++
++ /* Pop the top stack entry, and iterate through its contents. */
++ top = dirstack[--dirstack_top];
++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top);
++
++ count = php_scandir(name, &ents, index_filter, php_alphasort);
++
++ while (count > 0) {
++ struct stat st;
++ const char *leaf = ents[count - 1]->d_name;
++
++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s",
++ top, leaf);
++
++ if (strlen(name) && stat(name, &st) == 0) {
++ /* Name, relative to the zoneinfo prefix. */
++ const char *root = top;
++
++ if (root[0] == '/') root++;
++
++ snprintf(name, sizeof name, "%s%s%s", root,
++ *root ? "/": "", leaf);
++
++ if (S_ISDIR(st.st_mode)) {
++ if (dirstack_top == dirstack_size) {
++ dirstack_size *= 2;
++ dirstack = realloc(dirstack,
++ dirstack_size * sizeof *dirstack);
++ }
++ dirstack[dirstack_top++] = strdup(name);
++ }
++ else {
++ if (index_next == index_size) {
++ index_size *= 2;
++ db_index = realloc(db_index,
++ index_size * sizeof *db_index);
++ }
++
++ db_index[index_next].id = strdup(name);
++ db_index[index_next++].pos = 0;
++ }
++ }
++
++ free(ents[--count]);
++ }
++
++ if (count != -1) free(ents);
++ free(top);
++ } while (dirstack_top);
++
++ db->index = db_index;
++ db->index_size = index_next;
++
++ free(dirstack);
++}
++
++/* Return the mmap()ed tzfile if found, else NULL. On success, the
++ * length of the mapped data is placed in *length. */
++static char *map_tzfile(const char *timezone, size_t *length)
++{
++ char fname[PATH_MAX];
++ const char *fn;
++ struct stat st;
++ char *p;
++ int fd;
++
++ if (strcmp(timezone, TIMELIB_SYSTEM_TZID) == 0) {
++ fn = SYSTEM_TZFILE;
++ }
++ else {
++ if (strstr(timezone, "..") != NULL) {
++ return NULL;
++ }
++
++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
++ fn = fname;
++ }
++
++ fd = open(fn, O_RDONLY);
++ if (fd == -1) {
++ return NULL;
++ } else if (fstat(fd, &st) != 0 || st.st_size < 21) {
++ close(fd);
++ return NULL;
++ }
++
++ *length = st.st_size;
++ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
++ close(fd);
++
++ return p != MAP_FAILED ? p : NULL;
++}
++
++const timelib_tzdb *timelib_builtin_db(void)
++{
++ if (timezonedb_system == NULL) {
++ timelib_tzdb *tmp = malloc(sizeof *tmp);
++
++ tmp->version = "0.system";
++ tmp->data = NULL;
++ create_zone_index(tmp);
++ timezonedb_system = tmp;
++ }
++
++ return timezonedb_system;
++}
++
|
[-]
[+]
|
Added |
php5-alignment.patch
^
|
@@ -0,0 +1,35 @@
+--- ext/hash/php_hash_tiger.h
++++ ext/hash/php_hash_tiger.h
+@@ -25,9 +25,9 @@
+ typedef struct {
+ php_hash_uint64 state[3];
+ php_hash_uint64 passed;
++ unsigned char buffer[64];
+ unsigned char passes:1;
+ unsigned char length:7;
+- unsigned char buffer[64];
+ } PHP_TIGER_CTX;
+
+ PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context);
+--- ext/mbstring/oniguruma/regint.h
++++ ext/mbstring/oniguruma/regint.h
+@@ -256,7 +256,7 @@
+ #define NULL_UCHARP ((UChar* )0)
+
+ #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
+-#define WORD_ALIGNMENT_SIZE SIZEOF_INT
++#define WORD_ALIGNMENT_SIZE SIZEOF_LONG
+
+ #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
+ (pad_size) = WORD_ALIGNMENT_SIZE \
+--- ext/sysvshm/sysvshm.c
++++ ext/sysvshm/sysvshm.c
+@@ -375,7 +375,7 @@ static int php_put_shm_data(sysvshm_chun
+ long total_size;
+ long shm_varpos;
+
+- total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */
++ total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */
+
+ if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) {
+ php_remove_shm_data(ptr, shm_varpos);
|
[-]
[+]
|
Added |
php5-zend.patch
^
|
@@ -0,0 +1,20 @@
+--- Zend/zend.h
++++ Zend/zend.h
+@@ -34,8 +34,6 @@
+ #define END_EXTERN_C()
+ #endif
+
+-#include <stdio.h>
+-
+ /*
+ * general definitions
+ */
+@@ -54,6 +52,8 @@
+ # define ZEND_PATHS_SEPARATOR ':'
+ #endif
+
++#include <stdio.h>
++
+
+ #ifdef ZEND_WIN32
+ /* Only use this macro if you know for sure that all of the switches values
|
[-]
[+]
|
Added |
suhosin-0.9.24-return-non-void.patch
^
|
@@ -0,0 +1,13 @@
+Index: execute.c
+===================================================================
+--- execute.c.orig 2008-05-10 18:01:22.000000000 +0200
++++ execute.c 2008-06-10 09:03:38.000000000 +0200
+@@ -1042,7 +1042,7 @@ static int ih_function_exists(IH_HANDLER
+ int func_name_len;
+
+ if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
+- ZEND_WRONG_PARAM_COUNT();
++ ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(1);
+ }
+ convert_to_string_ex(function_name);
+ func_name_len = Z_STRLEN_PP(function_name);
|
|
Renamed |
suhosin-patch-5.2.12-0.9.7.patch.gz
^
|
|
Deleted |
suhosin-0.9.27.tgz
^
|