rpms/php-eaccelerator/FC-5 eaccelerator-0.9.5-beta2-64bit_cast_warning.patch, NONE, 1.1 eaccelerator-0.9.5-beta2-compile.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 php-eaccelerator.spec, 1.10, 1.11 sources, 1.5, 1.6
Matthias Saou (thias)
fedora-extras-commits at redhat.com
Tue May 23 09:12:27 UTC 2006
Author: thias
Update of /cvs/extras/rpms/php-eaccelerator/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21656
Modified Files:
.cvsignore php-eaccelerator.spec sources
Added Files:
eaccelerator-0.9.5-beta2-64bit_cast_warning.patch
eaccelerator-0.9.5-beta2-compile.patch
Log Message:
Backport all development changes : Update to 0.9.5beta2, include patches and enhance the versions detection in the spec file.
eaccelerator-0.9.5-beta2-64bit_cast_warning.patch:
--- NEW FILE eaccelerator-0.9.5-beta2-64bit_cast_warning.patch ---
Index: opcodes.h
===================================================================
--- opcodes.h (revision 202)
+++ opcodes.h (working copy)
@@ -85,7 +85,7 @@
#define OPS_STD EXT_STD | OP1_STD | OP2_STD | RES_STD
#ifdef ZEND_ENGINE_2
-# define VAR_NUM(var) ((unsigned int)(((temp_variable *)(var))-((temp_variable *)NULL)))
+# define VAR_NUM(var) ((unsigned int)(((temp_variable *)((intptr_t) var))-((temp_variable *)NULL)))
# define VAR_VAL(var) ((unsigned int)((var)*sizeof(temp_variable)))
#else
# define VAR_NUM(var) ((unsigned int)(var))
Index: loader.c
===================================================================
--- loader.c (revision 202)
+++ loader.c (working copy)
@@ -86,7 +86,7 @@
zend_bailout();
}
#ifdef ZEND_ENGINE_2
- return (unsigned int)(((temp_variable*)NULL) + var);
+ return (unsigned int)((intptr_t) ((temp_variable*)NULL) + var);
#else
return var;
#endif
eaccelerator-0.9.5-beta2-compile.patch:
--- NEW FILE eaccelerator-0.9.5-beta2-compile.patch ---
Index: optimize.c
===================================================================
--- optimize.c (revision 199)
+++ optimize.c (working copy)
@@ -1499,23 +1499,26 @@
if (!EAG(encoder) ||
(name_len == sizeof("false")-1 && strcmp(name,"false") == 0) ||
(name_len == sizeof("true")-1 && strcmp(name,"true") == 0)) {
- zend_constant *c;
+ union {
+ zend_constant *v;
+ void *ptr;
+ } c;
int retval;
char *lookup_name = do_alloca(name_len+1);
memcpy(lookup_name, name, name_len);
lookup_name[name_len] = '\0';
- if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
- *result = c;
+ if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, &c.ptr)==SUCCESS) {
+ *result = c.v;
retval=1;
} else {
zend_str_tolower(lookup_name, name_len);
- if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
- if ((c->flags & CONST_CS) && (memcmp(c->name, name, name_len)!=0)) {
+ if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, &c.ptr)==SUCCESS) {
+ if ((c.v->flags & CONST_CS) && (memcmp(c.v->name, name, name_len)!=0)) {
retval=0;
} else {
- *result = c;
+ *result = c.v;
retval=1;
}
} else {
@@ -2543,52 +2546,49 @@
#endif
IS_DEFINED(op->op1)) {
zend_op *x = DEFINED_OP(op->op1);
- if ((x->opcode == ZEND_FETCH_W || x->opcode == ZEND_FETCH_RW) &&
- x->op1.op_type == IS_CONST &&
- x->op1.u.constant.type == IS_STRING) {
+ if ((x->opcode == ZEND_FETCH_W || x->opcode == ZEND_FETCH_RW) &&
+ x->op1.op_type == IS_CONST && x->op1.u.constant.type == IS_STRING) {
+ union {
+ zend_op *v;
+ void *ptr;
+ } op_copy;
char *s = emalloc(x->op1.u.constant.value.str.len+2);
+ op_copy.v = op;
memcpy(s,x->op1.u.constant.value.str.val,x->op1.u.constant.value.str.len);
s[x->op1.u.constant.value.str.len] = (char)FETCH_TYPE(x);
s[x->op1.u.constant.value.str.len+1] = '\0';
- zend_hash_update(&assigns,
- s, x->op1.u.constant.value.str.len+2,
- (void**)&op, sizeof(void*), NULL);
+ zend_hash_update(&assigns, s, x->op1.u.constant.value.str.len+2, &op_copy.ptr,
+ sizeof(void*), NULL);
efree(s);
}
}
- } else if ((op->opcode == ZEND_FETCH_R ||
- op->opcode == ZEND_FETCH_IS) &&
- !global[VAR_NUM(op->result.u.var)] &&
- op->op1.op_type == IS_CONST &&
- op->op1.u.constant.type == IS_STRING) {
- zend_op *x;
+ } else if ((op->opcode == ZEND_FETCH_R || op->opcode == ZEND_FETCH_IS) &&
+ !global[VAR_NUM(op->result.u.var)] && op->op1.op_type == IS_CONST &&
+ op->op1.u.constant.type == IS_STRING) {
+ union {
+ zend_op *v;
+ void *ptr;
+ } x;
char *s = emalloc(op->op1.u.constant.value.str.len+2);
memcpy(s,op->op1.u.constant.value.str.val,op->op1.u.constant.value.str.len);
s[op->op1.u.constant.value.str.len] = (char)FETCH_TYPE(op);
s[op->op1.u.constant.value.str.len+1] = '\0';
- if (zend_hash_find(&assigns,
- s, op->op1.u.constant.value.str.len+2,
- (void**)&x) == SUCCESS) {
- x = *(zend_op**)x;
-/*
- if (x->opcode == ZEND_ASSIGN && x->op2.op_type == IS_CONST) {
- zend_printf("possible const propogation in %s:%s (%s,%u:%u)<br>\n",op_array->filename, op_array->function_name, op->op1.u.constant.value.str.val, x-op_array->opcodes, op-op_array->opcodes);
- }
-*/
- memcpy(&x->result, &op->result, sizeof(op->result));
- x->result.u.EA.type = 0;
- SET_DEFINED(x);
- zend_hash_del(&assigns,
- s, op->op1.u.constant.value.str.len+2);
+ if (zend_hash_find(&assigns, s, op->op1.u.constant.value.str.len+2,
+ &x.ptr) == SUCCESS) {
+ x.v = *(zend_op**)x.v;
+ memcpy(&x.v->result, &op->result, sizeof(op->result));
+ x.v->result.u.EA.type = 0;
+ SET_DEFINED(x.v);
+ zend_hash_del(&assigns, s, op->op1.u.constant.value.str.len+2);
STR_FREE(op->op1.u.constant.value.str.val);
SET_TO_NOP(op);
}
efree(s);
} else if (op->opcode == ZEND_FETCH_DIM_R &&
- op->extended_value != ZEND_FETCH_ADD_LOCK &&
- op->op1.op_type == IS_VAR &&
- IS_DEFINED(op->op1)) {
+ op->extended_value != ZEND_FETCH_ADD_LOCK &&
+ op->op1.op_type == IS_VAR &&
+ IS_DEFINED(op->op1)) {
zend_op *x = DEFINED_OP(op->op1);
while ((x->opcode == ZEND_ASSIGN_REF ||
x->opcode == ZEND_ASSIGN ||
@@ -2609,32 +2609,35 @@
IS_DEFINED(x->op1)) {
x = DEFINED_OP(x->op1);
}
- if ((x->opcode == ZEND_FETCH_R ||
- x->opcode == ZEND_FETCH_W ||
- x->opcode == ZEND_FETCH_RW) &&
- x->op1.op_type == IS_CONST &&
- x->op1.u.constant.type == IS_STRING) {
- zend_op *y;
+ if ((x->opcode == ZEND_FETCH_R || x->opcode == ZEND_FETCH_W ||
+ x->opcode == ZEND_FETCH_RW) && x->op1.op_type == IS_CONST &&
+ x->op1.u.constant.type == IS_STRING) {
+ union {
+ zend_op *v;
+ void *ptr;
+ } y;
+ union {
+ zend_op *v;
+ void *ptr;
+ } op_copy;
char *s = emalloc(x->op1.u.constant.value.str.len+2);
+ op_copy.v = op;
memcpy(s,x->op1.u.constant.value.str.val,x->op1.u.constant.value.str.len);
s[x->op1.u.constant.value.str.len] = (char)FETCH_TYPE(x);
s[x->op1.u.constant.value.str.len+1] = '\0';
- if (zend_hash_find(&fetch_dim,
- s, x->op1.u.constant.value.str.len+2,
- (void**)&y) == SUCCESS) {
- y = *(zend_op**)y;
- y->extended_value = ZEND_FETCH_ADD_LOCK;
- zend_hash_update(&fetch_dim,
- s, x->op1.u.constant.value.str.len+2,
- (void**)&op, sizeof(void*), NULL);
+ if (zend_hash_find(&fetch_dim, s, x->op1.u.constant.value.str.len+2,
+ &y.ptr) == SUCCESS) {
+ y.v = *(zend_op**)y.v;
+ y.v->extended_value = ZEND_FETCH_ADD_LOCK;
+ zend_hash_update(&fetch_dim, s, x->op1.u.constant.value.str.len+2,
+ &op_copy.ptr, sizeof(void*), NULL);
SET_UNDEFINED(x->result);
STR_FREE(x->op1.u.constant.value.str.val);
SET_TO_NOP(x);
- memcpy(&op->op1,&y->op1,sizeof(op->op1));
+ memcpy(&op->op1, &y.v->op1, sizeof(op->op1));
} else {
- zend_hash_update(&fetch_dim,
- s, x->op1.u.constant.value.str.len+2,
- (void**)&op, sizeof(void*), NULL);
+ zend_hash_update(&fetch_dim, s, x->op1.u.constant.value.str.len+2,
+ &op_copy.ptr, sizeof(void*), NULL);
}
efree(s);
}
@@ -3170,7 +3173,9 @@
void reassign_registers(zend_op_array *op_array, BB* p, char *global) {
zend_uint i;
zend_uint n = 0;
+#ifndef ZEND_ENGINE_2
int uses_globals = 0;
+#endif
int* assigned = do_alloca(op_array->T * sizeof(int));
char* reg_pool = do_alloca(op_array->T * sizeof(char));
char* used = do_alloca(op_array->T * sizeof(char));
Index: Makefile.in
===================================================================
--- Makefile.in (revision 199)
+++ Makefile.in (working copy)
@@ -2,6 +2,6 @@
LTLIBRARY_SOURCES = eaccelerator.c optimize.c encoder.c loader.c opcodes.c content.c mm.c session.c shm.c debug.c cache.c ea_restore.c ea_store.c ea_info.c ea_dasm.c
LTLIBRARY_SHARED_NAME = eaccelerator.la
-EXTRA_CFLAGS = -O2
+EXTRA_CFLAGS = -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
include $(top_srcdir)/build/dynlib.mk
Index: loader.c
===================================================================
--- loader.c (revision 199)
+++ loader.c (working copy)
@@ -212,6 +212,7 @@
}
}
+#ifndef ZEND_ENGINE_2
static unsigned char* decode_pstr(char** p, unsigned int* l) {
unsigned char c = decode(p, l);
if (c == 0) {
@@ -229,6 +230,7 @@
return str;
}
}
+#endif
static double decode_double(char** p, unsigned int* l) {
unsigned char sign;
@@ -250,7 +252,6 @@
typedef void* (*decode_bucket_t)(void* to, char**, unsigned int* TSRMLS_DC);
#define decode_zval_hash(to, p, l) decode_hash(to, sizeof(zval*), (decode_bucket_t)decode_zval_ptr, p, l TSRMLS_CC)
-#define decode_zval_hash_noref(to, p, l) decode_hash(to, sizeof(zval*), (decode_bucket_t)decode_zval_ptr_noref, p, l TSRMLS_CC)
static HashTable* decode_hash(HashTable* to, int size, decode_bucket_t decode_bucket, char**p, unsigned int* l TSRMLS_DC);
static zval* decode_zval_ptr(zval* to, char** p, unsigned int* l TSRMLS_DC);
@@ -315,6 +316,8 @@
return to;
}
+#ifndef ZEND_ENGINE_2
+#define decode_zval_hash_noref(to, p, l) decode_hash(to, sizeof(zval*), (decode_bucket_t)decode_zval_ptr_noref, p, l TSRMLS_CC)
static zval* decode_zval_ptr_noref(zval* to, char** p, unsigned int* l TSRMLS_DC) {
if (to == NULL) {
ALLOC_ZVAL(to);
@@ -324,6 +327,7 @@
to->refcount = 1;
return to;
}
+#endif
static void decode_znode(znode* to, unsigned int vars_count, char** p, unsigned int* l TSRMLS_DC) {
to->op_type = decode(p, l);
@@ -615,14 +619,19 @@
to->scope = EAG(class_entry);
to->fn_flags = decode32(p, l);
scope_name = decode_lstr((unsigned int*)&scope_name_len, p, l);
- if (to->scope == NULL && scope_name != NULL) {
- if (zend_hash_find(CG(class_table), (void *)scope_name,
- scope_name_len, (void **)&to->scope) == SUCCESS) {
- to->scope = *(zend_class_entry**)to->scope;
- } else {
- to->scope = NULL;
- }
- }
+ if (to->scope == NULL && scope_name != NULL) {
+ union {
+ zend_class_entry *v;
+ void *ptr;
+ } scope;
+ scope.v = to->scope;
+ if (zend_hash_find(CG(class_table), (void *)scope_name,
+ scope_name_len, &scope.ptr) == SUCCESS) {
+ to->scope = *(zend_class_entry**)to->scope;
+ } else {
+ to->scope = NULL;
+ }
+ }
#endif
if (to->type == ZEND_INTERNAL_FUNCTION) {
return to;
Index: mm.c
===================================================================
--- mm.c (revision 199)
+++ mm.c (working copy)
@@ -157,6 +157,7 @@
#undef MM_SHM_CAN_ATTACH
+#if defined(MM_SEM_POSIX) || defined(MM_SEM_FCNTL) || defined(MM_SEM_FLOCK) || defined(MM_SEM_WIN32) || defined(MM_SHM_MMAP_POSIX) || defined(MM_SHM_MMAP_FILE)
static int strxcat(char* dst, const char* src, int size) {
int dst_len = strlen(dst);
int src_len = strlen(src);
@@ -169,6 +170,7 @@
return 0;
}
}
+#endif
#if defined(MM_SEM_SPINLOCK)
@@ -191,9 +193,11 @@
spinlock_t spinlock;
} mm_mutex;
+/* not used
static int mm_attach_lock(const char* key, mm_mutex* lock) {
return 1;
}
+*/
static int mm_init_lock(const char* key, mm_mutex* lock) {
spinlock_init(&lock->spinlock);
Index: ea_restore.c
===================================================================
--- ea_restore.c (revision 199)
+++ ea_restore.c (working copy)
@@ -465,7 +465,10 @@
zend_op_array *restore_op_array(zend_op_array * to,
eaccelerator_op_array * from TSRMLS_DC)
{
- zend_function *function;
+ union {
+ zend_function *v;
+ void *ptr;
+ } function;
#ifdef ZEND_ENGINE_2
int fname_len = 0;
char *fname_lc = NULL;
@@ -529,8 +532,13 @@
* am I right here ? ;-(
*/
if (from->scope_name != NULL) {
+ union {
+ zend_class_entry *v;
+ void *ptr;
+ } scope;
char *from_scope_lc = zend_str_tolower_dup(from->scope_name, from->scope_name_len);
- if (zend_hash_find (CG(class_table), (void *) from_scope_lc, from->scope_name_len + 1, (void **) &to->scope) != SUCCESS) {
+ scope.v = to->scope;
+ if (zend_hash_find (CG(class_table), (void *) from_scope_lc, from->scope_name_len + 1, &scope.ptr) != SUCCESS) {
DBG(ea_debug_pad, (EA_DEBUG TSRMLS_CC));
DBG(ea_debug_printf, (EA_DEBUG, "[%d] can't find '%s' in class_table. use EAG(class_entry).\n", getpid(), from->scope_name));
to->scope = EAG(class_entry);
@@ -548,11 +556,11 @@
for (p = EAG(class_entry)->parent; p; p = p->parent) {
DBG(ea_debug_pad, (EA_DEBUG TSRMLS_CC));
DBG(ea_debug_printf, (EA_DEBUG, "[%d] checking parent '%s' have '%s'\n", getpid(), p->name, fname_lc));
- if (zend_hash_find(&p->function_table, fname_lc, fname_len + 1, (void **) &function) == SUCCESS) {
+ if (zend_hash_find(&p->function_table, fname_lc, fname_len + 1, &function.ptr) == SUCCESS) {
DBG(ea_debug_pad, (EA_DEBUG TSRMLS_CC));
DBG(ea_debug_printf, (EA_DEBUG, "[%d] '%s' has '%s' of scope '%s'\n",
- getpid(), p->name, fname_lc, function->common.scope->name));
- to->scope = function->common.scope;
+ getpid(), p->name, fname_lc, function.v->common.scope->name));
+ to->scope = function.v->common.scope;
break;
}
}
@@ -582,10 +590,10 @@
#else
to->function_name, strlen(to->function_name) + 1,
#endif
- (void **) &function) == SUCCESS && function->type == ZEND_INTERNAL_FUNCTION) {
+ &function.ptr) == SUCCESS && function.v->type == ZEND_INTERNAL_FUNCTION) {
DBG(ea_debug_pad, (EA_DEBUG TSRMLS_CC));
DBG(ea_debug_printf, (EA_DEBUG, "[%d] found in function table\n", getpid()));
- ((zend_internal_function *) (to))->handler = ((zend_internal_function *) function)->handler;
+ ((zend_internal_function *) (to))->handler = ((zend_internal_function *) function.v)->handler;
} else {
/* FIXME. I don't know how to fix handler.
* TODO: must solve this somehow, to avoid returning damaged structure...
@@ -805,7 +813,6 @@
eaccelerator_class_entry * from TSRMLS_DC)
{
zend_class_entry *old;
- zend_function *f = NULL;
DBG(ea_debug_pad, (EA_DEBUG TSRMLS_CC));
DBG(ea_debug_printf, (EA_DEBUG, "[%d] restore_class_entry: %s\n", getpid(), from->name ? from->name : "(top)"));
Index: ea_dasm.c
===================================================================
--- ea_dasm.c (revision 199)
+++ ea_dasm.c (working copy)
@@ -269,7 +269,7 @@
} else if (opline->extended_value == ZEND_ISEMPTY) {
snprintf(buf, sizeof(buf), "ZEND_ISEMPTY");
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
#ifdef ZEND_ENGINE_2
} else if ((op->ops & EXT_MASK) == EXT_ASSIGN) {
@@ -278,7 +278,7 @@
} else if (opline->extended_value == ZEND_ASSIGN_DIM) {
snprintf(buf, sizeof(buf), "ZEND_ASSIGN_DIM");
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
#ifndef ZEND_ENGINE_2_1
} else if (opline->opcode == ZEND_UNSET_DIM_OBJ) {
@@ -287,14 +287,14 @@
} else if (opline->extended_value == ZEND_UNSET_OBJ) {
snprintf(buf, sizeof(buf), "ZEND_UNSET_OBJ");
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
#endif
#endif
} else if (opline->extended_value != 0) {
snprintf(buf, sizeof(buf), "%ld", opline->extended_value);
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
add_assoc_string(el, "extended_value", buf, 1);
@@ -314,7 +314,7 @@
snprintf(buf, sizeof(buf), "$class%u", VAR_NUM(opline->op1.u.var));
} else if ((op->ops & OP1_MASK) == OP1_UCLASS) {
if (opline->op1.op_type == IS_UNUSED) {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
} else {
snprintf(buf, sizeof(buf), "$class%u", VAR_NUM(opline->op1.u.var));
}
@@ -328,6 +328,7 @@
if (offset >= op_array->last_brk_cont) {
goto brk_failed;
}
+ jmp_to = &op_array->brk_cont_array[offset];
offset = jmp_to->parent;
} while (--level > 0);
snprintf(buf, sizeof(buf), "opline(%d)", jmp_to->brk);
@@ -367,7 +368,7 @@
} else if (opline->op1.op_type == IS_VAR) {
snprintf(buf, sizeof(buf), "$var%u", VAR_NUM(opline->op1.u.var));
} else if (opline->op1.op_type == IS_UNUSED) {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
} else {
snprintf(buf, sizeof(buf), "UNKNOWN NODE %d", opline->op1.op_type);
}
@@ -415,7 +416,7 @@
} else if (opline->op2.u.constant.value.lval == ZEND_REQUIRE_ONCE) {
snprintf(buf, sizeof(buf), "ZEND_REQUIRE_ONCE");
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
} else if ((op->ops & OP2_MASK) == OP2_ARG) {
snprintf(buf, sizeof(buf), "arg(%u)", opline->op2.u.opline_num);
@@ -425,7 +426,7 @@
} else if (opline->op2.u.constant.value.lval == ZEND_ISEMPTY) {
snprintf(buf, sizeof(buf), "ZEND_ISEMPTY");
} else {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
}
} else {
if (opline->op2.op_type == IS_CONST) {
@@ -436,7 +437,7 @@
} else if (opline->op2.op_type == IS_VAR) {
snprintf(buf, sizeof(buf), "$var%u", VAR_NUM(opline->op2.u.var));
} else if (opline->op2.op_type == IS_UNUSED) {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
} else {
snprintf(buf, sizeof(buf), "UNKNOWN NODE %d", opline->op2.op_type);
}
@@ -466,7 +467,7 @@
snprintf(buf, sizeof(buf), "$var%u", VAR_NUM(opline->result.u.var));
}
} else if (opline->result.op_type == IS_UNUSED) {
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
} else {
snprintf(buf, sizeof(buf), "UNKNOWN NODE %d", opline->result.op_type);
}
@@ -485,7 +486,7 @@
}
break;
case RES_UNUSED:
- snprintf(buf, sizeof(buf), "");
+ buf[0] = '\0';
break;
default:
snprintf(buf, sizeof(buf), "UNKNOWN NODE %d", opline->result.op_type);
Index: ea_store.c
===================================================================
--- ea_store.c (revision 199)
+++ ea_store.c (working copy)
@@ -85,11 +85,14 @@
#endif
}
+
/* Calculate the size of a point to a class entry */
+/* not used
static void calc_class_entry_ptr(zend_class_entry ** from TSRMLS_DC)
{
calc_class_entry(*from TSRMLS_CC);
}
+*/
#endif
/* Calculate the size of an HashTable */
@@ -780,31 +783,37 @@
{
zend_class_entry *from = from_ce;
zend_class_entry *parent = from->parent;
- zend_property_info *pinfo, *cinfo = NULL;
- zval **pprop = NULL;
- zval **cprop = p->pData;
+ union {
+ zend_property_info *v;
+ void *ptr;
+ } pinfo, cinfo;
+ union {
+ zval **v;
+ void *ptr;
+ } pprop, cprop;
char *mname, *cname = NULL;
+ cprop.v = p->pData;
/* Check if this is a parent class. If so, copy unconditionally */
if (parent) {
/* unpack the \0classname\0membername\0 style property name to seperate vars */
zend_unmangle_property_name(p->arKey, &cname, &mname);
/* lookup the member's info in parent and child */
- if((zend_hash_find(&parent->properties_info, mname, strlen(mname)+1, (void**)&pinfo) == SUCCESS) &&
- (zend_hash_find(&from->properties_info, mname, strlen(mname)+1, (void**)&cinfo) == SUCCESS)) {
+ if((zend_hash_find(&parent->properties_info, mname, strlen(mname)+1, &pinfo.ptr) == SUCCESS) &&
+ (zend_hash_find(&from->properties_info, mname, strlen(mname)+1, &cinfo.ptr) == SUCCESS)) {
/* don't copy this static property if protected in parent and static public in child.
inheritance will handle this properly on restore */
- if(cinfo->flags & ZEND_ACC_STATIC && (pinfo->flags & ZEND_ACC_PROTECTED && cinfo->flags & ZEND_ACC_PUBLIC)) {
+ if(cinfo.v->flags & ZEND_ACC_STATIC && (pinfo.v->flags & ZEND_ACC_PROTECTED && cinfo.v->flags & ZEND_ACC_PUBLIC)) {
return ZEND_HASH_APPLY_REMOVE;
}
/* If the static member points to the same value in parent and child, remove for proper inheritance during restore */
# ifdef ZEND_ENGINE_2_1
- if(zend_hash_quick_find(&parent->default_static_members, p->arKey, p->nKeyLength, p->h, (void**)&pprop) == SUCCESS) {
+ if(zend_hash_quick_find(&parent->default_static_members, p->arKey, p->nKeyLength, p->h, &pprop.ptr) == SUCCESS) {
# else
- if(zend_hash_quick_find(parent->static_members, p->arKey, p->nKeyLength, p->h, (void**)&pprop) == SUCCESS) {
+ if(zend_hash_quick_find(parent->static_members, p->arKey, p->nKeyLength, p->h, &pprop.ptr) == SUCCESS) {
# endif
- if(*pprop == *cprop) {
+ if(*pprop.v == *cprop.v) {
return ZEND_HASH_APPLY_REMOVE;
}
}
Index: cache.c
===================================================================
--- cache.c (revision 199)
+++ cache.c (working copy)
@@ -278,7 +278,8 @@
q->next = q;
hdr.crc32 = eaccelerator_crc32((const char *) q, q->size);
if (write(f, &hdr, sizeof(hdr)) == sizeof(hdr)) {
- write(f, q, q->size);
+ ssize_t result = 0;
+ result = write(f, q, q->size);
EACCELERATOR_FLOCK(f, LOCK_UN);
close(f);
ret = 1;
@@ -596,7 +597,7 @@
{
unsigned int i, xlen;
zval *list;
- char *xkey;
+ char *xkey = "";
mm_user_cache_entry *p;
time_t t = time(0);
Index: content.c
===================================================================
--- content.c (revision 199)
+++ content.c (working copy)
@@ -121,16 +121,19 @@
static int eaccelerator_is_not_modified(zval* return_value TSRMLS_DC) {
char etag[256];
- zval **server_vars, **match;
+ union {
+ zval **v;
+ void *ptr;
+ } server_vars, match;
if (!SG(headers_sent)) {
sprintf(etag,"ETag: eaccelerator-%u",eaccelerator_crc32(Z_STRVAL_P(return_value),Z_STRLEN_P(return_value)));
sapi_add_header(etag, strlen(etag), 1);
- if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
- Z_TYPE_PP(server_vars) == IS_ARRAY &&
- zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_IF_NONE_MATCH", sizeof("HTTP_IF_NONE_MATCH"), (void **) &match)==SUCCESS &&
- Z_TYPE_PP(match) == IS_STRING) {
- if (strcmp(etag+6,Z_STRVAL_PP(match)) == 0 &&
+ if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), &server_vars.ptr) == SUCCESS &&
+ Z_TYPE_PP(server_vars.v) == IS_ARRAY &&
+ zend_hash_find(Z_ARRVAL_PP(server_vars.v), "HTTP_IF_NONE_MATCH", sizeof("HTTP_IF_NONE_MATCH"), &match.ptr)==SUCCESS &&
+ Z_TYPE_PP(match.v) == IS_STRING) {
+ if (strcmp(etag+6,Z_STRVAL_PP(match.v)) == 0 &&
sapi_add_header("HTTP/1.0 304", sizeof("HTTP/1.0 304") - 1, 1) == SUCCESS &&
sapi_add_header("Status: 304 Not Modified", sizeof("Status: 304 Not Modified") - 1, 1) == SUCCESS) {
zval_dtor(return_value);
@@ -183,17 +186,19 @@
static int eaccelerator_get_page(const char* key, int key_len, zval* return_value TSRMLS_DC) {
int ret = 0;
zval cache_array;
- zval **headers;
- zval **content;
+ union {
+ zval **v;
+ void *ptr;
+ } headers, content;
if (eaccelerator_get(key, key_len, &cache_array, eaccelerator_content_cache_place TSRMLS_CC)) {
if (Z_TYPE(cache_array) == IS_ARRAY) {
- if (zend_hash_find(Z_ARRVAL(cache_array),"content",sizeof("content"),(void**)&content) == SUCCESS &&
- Z_TYPE_PP(content) == IS_STRING) {
- if (zend_hash_find(Z_ARRVAL(cache_array),"headers",sizeof("headers"),(void**)&headers) == SUCCESS &&
- Z_TYPE_PP(headers) == IS_ARRAY) {
- zend_hash_apply(Z_ARRVAL_PP(headers), (apply_func_t)eaccelerator_send_header TSRMLS_CC);
+ if (zend_hash_find(Z_ARRVAL(cache_array),"content",sizeof("content"),&content.ptr) == SUCCESS &&
+ Z_TYPE_PP(content.v) == IS_STRING) {
+ if (zend_hash_find(Z_ARRVAL(cache_array),"headers",sizeof("headers"),&headers.ptr) == SUCCESS &&
+ Z_TYPE_PP(headers.v) == IS_ARRAY) {
+ zend_hash_apply(Z_ARRVAL_PP(headers.v), (apply_func_t)eaccelerator_send_header TSRMLS_CC);
}
- memcpy(return_value,*content, sizeof(zval));
+ memcpy(return_value,*content.v, sizeof(zval));
zval_copy_ctor(return_value);
ret = 1;
}
@@ -204,15 +209,18 @@
}
static void eaccelerator_compress(char* key, int key_len, zval* return_value, time_t ttl TSRMLS_DC) {
- zval **server_vars, **encoding;
+ union {
+ zval **v;
+ void *ptr;
+ } server_vars, encoding;
if (EAG(compression_enabled) &&
EAG(compress_content) &&
!SG(headers_sent) &&
- zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
- Z_TYPE_PP(server_vars) == IS_ARRAY &&
- zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void **) &encoding)==SUCCESS &&
- Z_TYPE_PP(encoding) == IS_STRING &&
+ zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), &server_vars.ptr) == SUCCESS &&
+ Z_TYPE_PP(server_vars.v) == IS_ARRAY &&
+ zend_hash_find(Z_ARRVAL_PP(server_vars.v), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), &encoding.ptr)==SUCCESS &&
+ Z_TYPE_PP(encoding.v) == IS_STRING &&
Z_TYPE_P(return_value) == IS_STRING &&
Z_STRLEN_P(return_value) >= EACCELERATOR_COMPRESS_MIN) {
char* zkey = NULL;
@@ -234,7 +242,7 @@
p = p->next;
}
- if (strstr(Z_STRVAL_PP(encoding),"x-gzip")) {
+ if (strstr(Z_STRVAL_PP(encoding.v),"x-gzip")) {
zkey_len = sizeof("gzip_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"gzip_",sizeof("gzip_")-1);
@@ -243,7 +251,7 @@
enc = "Content-Encoding: x-gzip";
params[0] = return_value;
gzip = 1;
- } else if (strstr(Z_STRVAL_PP(encoding),"gzip")) {
+ } else if (strstr(Z_STRVAL_PP(encoding.v),"gzip")) {
zkey_len = sizeof("gzip_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"gzip_",sizeof("gzip_")-1);
@@ -252,7 +260,7 @@
enc = "Content-Encoding: gzip";
params[0] = return_value;
gzip = 1;
- } else if (strstr(Z_STRVAL_PP(encoding),"deflate")) {
+ } else if (strstr(Z_STRVAL_PP(encoding.v),"deflate")) {
zkey_len = sizeof("deflate_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"deflate_",sizeof("deflate_")-1);
@@ -379,7 +387,10 @@
char* key;
int key_len;
long ttl = 0;
- zval **server_vars, **encoding;
+ union {
+ zval **v;
+ void *ptr;
+ } server_vars, encoding;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"s|l", &key, &key_len, &ttl) == FAILURE) {
@@ -394,26 +405,26 @@
if (EAG(compression_enabled) &&
EAG(compress_content) &&
!SG(headers_sent) &&
- zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
- Z_TYPE_PP(server_vars) == IS_ARRAY &&
- zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void **) &encoding)==SUCCESS &&
- Z_TYPE_PP(encoding) == IS_STRING) {
+ zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), &server_vars.ptr) == SUCCESS &&
+ Z_TYPE_PP(server_vars.v) == IS_ARRAY &&
+ zend_hash_find(Z_ARRVAL_PP(server_vars.v), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), &encoding.ptr)==SUCCESS &&
+ Z_TYPE_PP(encoding.v) == IS_STRING) {
char* zkey = NULL;
char* enc = NULL;
int zkey_len = 0;
- if (strstr(Z_STRVAL_PP(encoding),"x-gzip")) {
+ if (strstr(Z_STRVAL_PP(encoding.v),"x-gzip")) {
zkey_len = sizeof("gzip_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"gzip_",sizeof("gzip_")-1);
memcpy(zkey+sizeof("gzip_")-1,key,key_len+1);
enc = "Content-Encoding: x-gzip";
- } else if (strstr(Z_STRVAL_PP(encoding),"gzip")) {
+ } else if (strstr(Z_STRVAL_PP(encoding.v),"gzip")) {
zkey_len = sizeof("gzip_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"gzip_",sizeof("gzip_")-1);
memcpy(zkey+sizeof("gzip_")-1,key,key_len+1);
enc = "Content-Encoding: gzip";
- } else if (strstr(Z_STRVAL_PP(encoding),"deflate")) {
+ } else if (strstr(Z_STRVAL_PP(encoding.v),"deflate")) {
zkey_len = sizeof("deflate_") + key_len - 1;
zkey = emalloc(zkey_len+1);
memcpy(zkey,"deflate_",sizeof("deflate_")-1);
Index: encoder.c
===================================================================
--- encoder.c (revision 199)
+++ encoder.c (working copy)
@@ -249,26 +249,27 @@
}
allow = 1;
} else if (allow && ch == '_') {
+ size_t result = 0;
label[0] = ch = fgetc(yyin);
if (ch == EOF) {break;}
if (ch == '_') {
label[1] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,1,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,1,1,yyout); break;}
if (IEQ('f')) {
label[2] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,2,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,2,1,yyout); break;}
if (IEQ('i')) {
label[3] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,3,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,3,1,yyout); break;}
if (IEQ('l')) {
label[4] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,4,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,4,1,yyout); break;}
if (IEQ('e')) {
label[5] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,5,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,5,1,yyout); break;}
if (ch == '_') {
label[6] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,6,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,6,1,yyout); break;}
if (ch == '_') {
ch = fgetc(yyin);
repeat = 1;
@@ -277,40 +278,40 @@
(ch >= '0' && ch <= '9') ||
(ch >= '\x7f' && ch <= '\xff') ||
ch == '_') {
- fwrite(label,7,1,yyout);
+ result = fwrite(label,7,1,yyout);
} else {
fputs("eaccelerator_loader_file()",yyout);
}
} else {
- fwrite(label,7,1,yyout);
+ result = fwrite(label,7,1,yyout);
}
} else {
- fwrite(label,6,1,yyout);
+ result = fwrite(label,6,1,yyout);
}
} else {
- fwrite(label,5,1,yyout);
+ result = fwrite(label,5,1,yyout);
}
} else {
- fwrite(label,4,1,yyout);
+ result = fwrite(label,4,1,yyout);
}
} else {
- fwrite(label,3,1,yyout);
+ result = fwrite(label,3,1,yyout);
}
} else if (IEQ('l')) {
label[2] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,2,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,2,1,yyout); break;}
if (IEQ('i')) {
label[3] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,3,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,3,1,yyout); break;}
if (IEQ('n')) {
label[4] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,4,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,4,1,yyout); break;}
if (IEQ('e')) {
label[5] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,5,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,5,1,yyout); break;}
if (ch == '_') {
label[6] = ch = fgetc(yyin);
- if (ch == EOF) {fwrite(label,6,1,yyout); break;}
+ if (ch == EOF) {result = fwrite(label,6,1,yyout); break;}
if (ch == '_') {
ch = fgetc(yyin);
repeat = 1;
@@ -319,30 +320,30 @@
(ch >= '0' && ch <= '9') ||
(ch >= '\x7f' && ch <= '\xff') ||
ch == '_') {
- fwrite(label,7,1,yyout);
+ result = fwrite(label,7,1,yyout);
} else {
fputs("eaccelerator_loader_line()",yyout);
}
} else {
- fwrite(label,7,1,yyout);
+ result = fwrite(label,7,1,yyout);
}
} else {
- fwrite(label,6,1,yyout);
+ result = fwrite(label,6,1,yyout);
}
} else {
- fwrite(label,5,1,yyout);
+ result = fwrite(label,5,1,yyout);
}
} else {
- fwrite(label,4,1,yyout);
+ result = fwrite(label,4,1,yyout);
}
} else {
- fwrite(label,3,1,yyout);
+ result = fwrite(label,3,1,yyout);
}
} else {
- fwrite(label,2,1,yyout);
+ result = fwrite(label,2,1,yyout);
}
} else {
- fwrite(label,1,1,yyout);
+ result = fwrite(label,1,1,yyout);
}
allow = 0;
} else if ((ch >= 'a' && ch <= 'z') ||
@@ -694,9 +695,11 @@
static void encode_class_entry(zend_class_entry* from);
+/* not used
static void encode_class_entry_ptr(zend_class_entry** from) {
encode_class_entry(*from);
}
+*/
#endif
static void encode_hash(HashTable* from, encode_bucket_t encode_bucket) {
@@ -718,6 +721,7 @@
}
}
+/* not used
#ifdef ZEND_ENGINE_2
#define encode_zval_hash_ex(from,p) encode_hash_ex(from, p, (encode_bucket_t)encode_zval_ptr)
@@ -744,6 +748,7 @@
}
}
#endif
+*/
static void encode_op(zend_op_array* from, zend_op* opline, unsigned int ops) {
encode(opline->opcode);
@@ -1182,11 +1187,12 @@
}
if (prefix != NULL)
{
+ size_t result = 0;
prefix->type = IS_STRING;
prefix->value.str.len = pos;
prefix->value.str.val = emalloc(pos+1);
rewind(src_fp);
- fread(prefix->value.str.val, pos, 1, src_fp);
+ result = fread(prefix->value.str.val, pos, 1, src_fp);
prefix->value.str.val[prefix->value.str.len] = '\000';
}
}
@@ -1203,9 +1209,10 @@
FILE *tmp_fp = tmpfile();
if (tmp_fp)
{
+ size_t result = 0;
if (pre_content_len > 0)
{
- fwrite(pre_content, pre_content_len, 1, tmp_fp);
+ result = fwrite(pre_content, pre_content_len, 1, tmp_fp);
}
#ifndef WITHOUT_FILE_FILTER
filter_file(src_fp, tmp_fp TSRMLS_CC);
@@ -1219,7 +1226,7 @@
#endif
if (post_content_len > 0)
{
- fwrite(post_content, post_content_len, 1, tmp_fp);
+ result = fwrite(post_content, post_content_len, 1, tmp_fp);
}
rewind(tmp_fp);
fclose(src_fp);
Index: eaccelerator.c
===================================================================
--- eaccelerator.c (revision 199)
+++ eaccelerator.c (working copy)
@@ -349,6 +349,7 @@
(v3 & 0xff);
}
+/* This function isn't used. So disable it for now
static void decode_version(char *version, int v) {
int t = (v & 0x000f00) >> 8;
char c;
@@ -363,7 +364,8 @@
(v & 0x0ff000) >> 12,
c,
(v & 0x0000ff));
-}
+}
+*/
#ifdef EACCELERATOR_USE_INODE
static int eaccelerator_inode_key(char* s, dev_t dev, ino_t ino TSRMLS_DC) {
@@ -1033,6 +1035,7 @@
return ok;
}
+#ifndef EACCELERATOR_USE_INODE
static char* eaccelerator_realpath(const char* name, char* realname TSRMLS_DC) {
/* ???TODO it is possibe to cache name->realname mapping to avoid lstat() calls */
#if ZEND_MODULE_API_NO >= 20001222
@@ -1041,6 +1044,7 @@
return V_REALPATH(name, realname);
#endif
}
+#endif
static int eaccelerator_stat(zend_file_handle *file_handle,
char* realname, struct stat* buf TSRMLS_DC) {
@@ -1226,7 +1230,9 @@
int nreloads;
time_t compile_time;
int stat_result = 0;
+#ifdef DEBUG
struct timeval tv_start;
+#endif
#ifdef EACCELERATOR_USE_INODE
realname[0] = '\000';
@@ -2095,21 +2101,28 @@
/* Storing Host Name */
EAG(hostname)[0] = '\000';
{
- zval **server_vars, **hostname;
+ union {
+ zval **v;
+ void *ptr;
+ } server_vars;
+ union {
+ zval **v;
+ void *ptr;
+ } hostname;
- if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
- Z_TYPE_PP(server_vars) == IS_ARRAY &&
- zend_hash_find(Z_ARRVAL_PP(server_vars), "SERVER_NAME", sizeof("SERVER_NAME"), (void **) &hostname)==SUCCESS &&
- Z_TYPE_PP(hostname) == IS_STRING &&
- Z_STRLEN_PP(hostname) > 0)
+ if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), &server_vars.ptr) == SUCCESS &&
+ Z_TYPE_PP(server_vars.v) == IS_ARRAY &&
+ zend_hash_find(Z_ARRVAL_PP(server_vars.v), "SERVER_NAME", sizeof("SERVER_NAME"), &hostname.ptr)==SUCCESS &&
+ Z_TYPE_PP(hostname.v) == IS_STRING &&
+ Z_STRLEN_PP(hostname.v) > 0)
{
- if (sizeof(EAG(hostname)) > Z_STRLEN_PP(hostname))
+ if (sizeof(EAG(hostname)) > Z_STRLEN_PP(hostname.v))
{
- memcpy(EAG(hostname),Z_STRVAL_PP(hostname),Z_STRLEN_PP(hostname)+1);
+ memcpy(EAG(hostname),Z_STRVAL_PP(hostname.v),Z_STRLEN_PP(hostname.v)+1);
}
else
{
- memcpy(EAG(hostname),Z_STRVAL_PP(hostname),sizeof(EAG(hostname))-1);
+ memcpy(EAG(hostname),Z_STRVAL_PP(hostname.v),sizeof(EAG(hostname))-1);
EAG(hostname)[sizeof(EAG(hostname))-1] = '\000';
}
}
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/php-eaccelerator/FC-5/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore 14 Mar 2006 11:05:06 -0000 1.5
+++ .cvsignore 23 May 2006 09:12:27 -0000 1.6
@@ -1 +1 @@
-eaccelerator-svn200603090012.tar.gz
+eaccelerator-0.9.5-beta2.tar.bz2
Index: php-eaccelerator.spec
===================================================================
RCS file: /cvs/extras/rpms/php-eaccelerator/FC-5/php-eaccelerator.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- php-eaccelerator.spec 14 Mar 2006 12:08:27 -0000 1.10
+++ php-eaccelerator.spec 23 May 2006 09:12:27 -0000 1.11
@@ -1,8 +1,14 @@
-%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
-%{!?php_version:%define php_version %(php-config --version 2>/dev/null || echo 4.4.1)}
-
-%define module_version 0.9.3
-%define prever svn200603090012
+# Useful defaults when building in chroots on systems where PHP is unavailable
+%define default_extdir %{_libdir}/php4
+%define default_apiver 20041225
+%define default_version 5.1.4
+
+%define module_version 0.9.5
+%define prever beta2
+
+%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{default_extdir})
+%define php_apiver %((echo %{default_apiver}; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
+%{!?php_version:%define php_version %(php-config --version 2>/dev/null || echo %{default_version})}
# This is the apache userid, only used for sysvipc semaphores which is the
# default on ppc since spinlock is not detected
@@ -11,19 +17,20 @@
Summary: PHP accelerator, optimizer, encoder and dynamic content cacher
Name: php-eaccelerator
Version: %{php_version}_%{module_version}
-Release: 0.3%{?dist}
+Release: 0.2.%{prever}%{?dist}
License: GPL
Group: Development/Languages
URL: http://eaccelerator.sourceforge.net/
-#Source: http://dl.sf.net/eaccelerator/eaccelerator-%{module_version}.tar.gz
-Source: http://snapshots.eaccelerator.net/eaccelerator-%{prever}.tar.gz
+Source: http://dl.sf.net/eaccelerator/eaccelerator-%{module_version}-%{prever}.tar.bz2
+Patch0: eaccelerator-0.9.5-beta2-compile.patch
+Patch1: eaccelerator-0.9.5-beta2-64bit_cast_warning.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-Requires: php = %{php_version}
+Requires: php-api = %{php_apiver}
Provides: php-zend_extension
Conflicts: php-mmcache
BuildRequires: php, php-devel
# Required by phpize
-BuildRequires: autoconf, automake, libtool, gcc-c++
+BuildRequires: autoconf, automake, libtool
%description
eAccelerator is a further development of the MMCache PHP Accelerator & Encoder.
@@ -32,8 +39,9 @@
%prep
-#setup -n eaccelerator-%{module_version}
-%setup -n eaccelerator-%{prever}
+%setup -n eaccelerator-%{module_version}-%{prever}
+%patch0 -p0
+%patch1 -p0
%build
@@ -42,12 +50,7 @@
%ifarch ppc
--with-eaccelerator-userid="%{userid}"
%endif
-# Set fcntl based semaphores to avoid ipc based locking issues on x86_64
-%ifarch x86_64
-%{__perl} -pi -e 's|.*(MM_SEM_[A-Z]+).*|/* #undef $1 */|g' config.h
-%{__perl} -pi -e 's|.*(MM_SEM_FCNTL).*|#define $1 1|g' config.h
-%endif
-# Compile!
+
%{__make} %{?_smp_mflags}
@@ -97,6 +100,17 @@
%changelog
+* Tue May 23 2006 Matthias Saou <http://freshrpms.net/> 5.1.x_0.9.5-0.2.beta2
+- Rebuild against PHP 5.1.4.
+
+* Fri May 5 2006 Matthias Saou <http://freshrpms.net/> 5.1.x_0.9.5-0.2.beta2
+- Rework heavily the API version requirement detection, should work with
+ chroots builds where PHP isn't installed outside.
+- Replace the CC way of getting the API version with php -i output.
+
+* Tue Apr 11 2006 Matthias Saou <http://freshrpms.net/> 5.1.x_0.9.5-0.1.beta2
+- Update to 0.9.5-beta2.
+
* Tue Mar 14 2006 Matthias Saou <http://freshrpms.net/> 5.1.x_0.9.3-0.3
- Pass userid 48 to configure script on PPC for sysvipc semaphores.
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/php-eaccelerator/FC-5/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources 14 Mar 2006 11:05:06 -0000 1.5
+++ sources 23 May 2006 09:12:27 -0000 1.6
@@ -1 +1 @@
-762cb56c56190186e5e9a46b2fd2798d eaccelerator-svn200603090012.tar.gz
+2516b680ce372765d24e7b64003f1e64 eaccelerator-0.9.5-beta2.tar.bz2
More information about the fedora-extras-commits
mailing list