Toshaan Bharvani
2 years ago
commit
33e144d7f2
7 changed files with 1349 additions and 0 deletions
Binary file not shown.
@ -0,0 +1,100 @@
@@ -0,0 +1,100 @@
|
||||
diff -up rrdtool-1.4.4/php4/rrdtool.c.php54 rrdtool-1.4.4/php4/rrdtool.c |
||||
--- rrdtool-1.4.4/php4/rrdtool.c.php54 2011-12-29 08:57:00.790784347 +0100 |
||||
+++ rrdtool-1.4.4/php4/rrdtool.c 2011-12-29 09:00:55.960794927 +0100 |
||||
@@ -39,7 +39,7 @@ |
||||
ZEND_DECLARE_MODULE_GLOBALS(rrdtool) |
||||
*/ |
||||
|
||||
-function_entry rrdtool_functions[] = { |
||||
+zend_function_entry rrdtool_functions[] = { |
||||
PHP_FE(rrd_graph, NULL) |
||||
PHP_FE(rrd_fetch, NULL) |
||||
PHP_FE(rrd_error, NULL) |
||||
@@ -119,8 +119,8 @@ PHP_MINFO_FUNCTION(rrdtool) |
||||
Creates a graph based on options passed via an array */ |
||||
PHP_FUNCTION(rrd_graph) |
||||
{ |
||||
- pval *file, *args, *p_argc; |
||||
- pval *entry; |
||||
+ zval *file, *args, *p_argc; |
||||
+ zval *entry; |
||||
zval *p_calcpr; |
||||
HashTable *args_arr; |
||||
int i, xsize, ysize, argc; |
||||
@@ -155,7 +155,7 @@ PHP_FUNCTION(rrd_graph) |
||||
|
||||
for (i = 3; i < argc; i++) |
||||
{ |
||||
- pval **dataptr; |
||||
+ zval **dataptr; |
||||
|
||||
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE ) |
||||
continue; |
||||
@@ -216,9 +216,8 @@ PHP_FUNCTION(rrd_graph) |
||||
Fetch info from an RRD file */ |
||||
PHP_FUNCTION(rrd_fetch) |
||||
{ |
||||
- pval *file, *args, *p_argc; |
||||
- pval *entry; |
||||
- pval *p_start, *p_end, *p_step, *p_ds_cnt; |
||||
+ zval *file, *args, *p_argc; |
||||
+ zval *entry; |
||||
HashTable *args_arr; |
||||
zval *p_ds_namv, *p_data; |
||||
int i, j, argc; |
||||
@@ -254,7 +253,7 @@ PHP_FUNCTION(rrd_fetch) |
||||
|
||||
for (i = 3; i < argc; i++) |
||||
{ |
||||
- pval **dataptr; |
||||
+ zval **dataptr; |
||||
|
||||
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE ) |
||||
continue; |
||||
@@ -361,7 +360,7 @@ PHP_FUNCTION(rrd_clear_error) |
||||
Update an RRD file with values specified */ |
||||
PHP_FUNCTION(rrd_update) |
||||
{ |
||||
- pval *file, *opt; |
||||
+ zval *file, *opt; |
||||
char **argv; |
||||
|
||||
if ( rrd_test_error() ) |
||||
@@ -404,7 +403,7 @@ PHP_FUNCTION(rrd_update) |
||||
Gets last update time of an RRD file */ |
||||
PHP_FUNCTION(rrd_last) |
||||
{ |
||||
- pval *file; |
||||
+ zval *file; |
||||
unsigned long retval; |
||||
|
||||
char **argv = (char **) emalloc(3 * sizeof(char *)); |
||||
@@ -439,8 +438,8 @@ PHP_FUNCTION(rrd_last) |
||||
Create an RRD file with the options passed (passed via array) */ |
||||
PHP_FUNCTION(rrd_create) |
||||
{ |
||||
- pval *file, *args, *p_argc; |
||||
- pval *entry; |
||||
+ zval *file, *args, *p_argc; |
||||
+ zval *entry; |
||||
char **argv; |
||||
HashTable *args_arr; |
||||
int argc, i; |
||||
@@ -449,7 +448,7 @@ PHP_FUNCTION(rrd_create) |
||||
rrd_clear_error(); |
||||
|
||||
if ( ZEND_NUM_ARGS() == 3 && |
||||
- getParameters(ht, 3, &file, &args, &p_argc) == SUCCESS ) |
||||
+ zend_get_parameters(ht, 3, &file, &args, &p_argc) == SUCCESS ) |
||||
{ |
||||
if ( args->type != IS_ARRAY ) |
||||
{ |
||||
@@ -473,7 +472,7 @@ PHP_FUNCTION(rrd_create) |
||||
|
||||
for (i = 3; i < argc; i++) |
||||
{ |
||||
- pval **dataptr; |
||||
+ zval **dataptr; |
||||
|
||||
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE ) |
||||
continue; |
@ -0,0 +1,83 @@
@@ -0,0 +1,83 @@
|
||||
--- rrdtool-1.4.7/php4/rrdtool.c.orig 2013-03-22 14:54:18.520877577 +0100 |
||||
+++ rrdtool-1.4.7/php4/rrdtool.c 2013-03-22 14:59:23.056303502 +0100 |
||||
@@ -20,13 +20,11 @@ |
||||
|
||||
/* PHP Includes */ |
||||
#include "php.h" |
||||
-#include "php_logos.h" |
||||
#include "ext/standard/info.h" |
||||
#include "SAPI.h" |
||||
|
||||
/* rrdtool includes */ |
||||
#include "php_rrdtool.h" |
||||
-#include "rrdtool_logo.h" |
||||
#include <rrd.h> |
||||
|
||||
#ifdef HAVE_CONFIG_H |
||||
@@ -48,7 +46,6 @@ |
||||
PHP_FE(rrd_last, NULL) |
||||
PHP_FE(rrd_create, NULL) |
||||
PHP_FE(rrdtool_info, NULL) |
||||
- PHP_FE(rrdtool_logo_guid, NULL) |
||||
{NULL, NULL, NULL} |
||||
}; |
||||
|
||||
@@ -83,8 +80,6 @@ |
||||
/* {{{ PHP_MINIT_FUNCTION */ |
||||
PHP_MINIT_FUNCTION(rrdtool) |
||||
{ |
||||
- php_register_info_logo(RRDTOOL_LOGO_GUID , "image/gif", rrdtool_logo , sizeof(rrdtool_logo)); |
||||
- |
||||
return SUCCESS; |
||||
} |
||||
/* }}} */ |
||||
@@ -92,8 +87,6 @@ |
||||
/* {{{ PHP_MSHUTDOWN_FUNCTION */ |
||||
PHP_MSHUTDOWN_FUNCTION(rrdtool) |
||||
{ |
||||
- php_unregister_info_logo(RRDTOOL_LOGO_GUID); |
||||
- |
||||
return SUCCESS; |
||||
} |
||||
/* }}} */ |
||||
@@ -102,11 +95,6 @@ |
||||
PHP_MINFO_FUNCTION(rrdtool) |
||||
{ |
||||
php_info_print_box_start(1); |
||||
- PUTS("<a href=\"http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/\" target=\"rrdtool\"><img border=\"0\" src=\""); |
||||
- if (SG(request_info).request_uri) { |
||||
- PUTS(SG(request_info).request_uri); |
||||
- } |
||||
- PUTS("?="RRDTOOL_LOGO_GUID"\" alt=\"ClamAV logo\" /></a>\n"); |
||||
php_printf("<h1 class=\"p\">rrdtool Version %s</h1>\n", PHP_RRD_VERSION_STRING); |
||||
php_info_print_box_end(); |
||||
php_info_print_table_start(); |
||||
@@ -548,11 +536,6 @@ |
||||
PUTS("<body><div class=\"center\">\n"); |
||||
|
||||
php_info_print_box_start(1); |
||||
- PUTS("<a href=\"http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/\" target=\"rrdtool\"><img border=\"0\" src=\""); |
||||
- if (SG(request_info).request_uri) { |
||||
- PUTS(SG(request_info).request_uri); |
||||
- } |
||||
- PUTS("?="RRDTOOL_LOGO_GUID"\" alt=\"ClamAV logo\" /></a>\n"); |
||||
php_printf("<h1 class=\"p\">rrdtool Version %s</h1>\n", PHP_RRD_VERSION_STRING); |
||||
php_info_print_box_end(); |
||||
php_info_print_table_start(); |
||||
@@ -590,16 +573,6 @@ |
||||
} |
||||
/* }}} */ |
||||
|
||||
-PHP_FUNCTION(rrdtool_logo_guid) |
||||
-{ |
||||
- if (ZEND_NUM_ARGS() != 0) { |
||||
- WRONG_PARAM_COUNT; |
||||
- } |
||||
- |
||||
- RETURN_STRINGL(RRDTOOL_LOGO_GUID, sizeof(RRDTOOL_LOGO_GUID)-1, 1); |
||||
-} |
||||
-/* }}} */ |
||||
- |
||||
#endif /* HAVE_RRDTOOL */ |
||||
|
||||
/* |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
--- a/php4/ltconfig 2014-08-11 13:01:13.020065855 +0000 |
||||
+++ a/php4/ltconfig 2014-08-11 13:01:23.870060274 +0000 |
||||
@@ -1939,7 +1939,7 @@ |
||||
else |
||||
# Only the GNU ld.so supports shared libraries on MkLinux. |
||||
case "$host_cpu" in |
||||
- powerpc*) dynamic_linker=no ;; |
||||
+# powerpc*) dynamic_linker=no ;; |
||||
*) dynamic_linker='Linux ld.so' ;; |
||||
esac |
||||
fi |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
diff --git a/bindings/Makefile.am b/bindings/Makefile.am |
||||
index 54f5c23..ee85c23 100644 |
||||
--- a/bindings/Makefile.am |
||||
+++ b/bindings/Makefile.am |
||||
@@ -35,8 +35,9 @@ install-data-local: |
||||
&& $(MAKE) install ) \ |
||||
|| true |
||||
$(AM_V_GEN)test -f ${builddir}/ruby/Makefile \ |
||||
- && ( cd ${builddir}/ruby \ |
||||
- && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install ) \ |
||||
+ && ( $(MKDIR_P) $(DESTDIR)$(libdir)/ruby/vendor_ruby && cd ${builddir}/ruby \ |
||||
+ && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) \ |
||||
+ hdrdir="$(includedir)" rubyhdrdir="$(includedir)" includedir="$(includedir)" install ) \ |
||||
|| true |
||||
$(AM_V_GEN)test -d ${builddir}/python/build \ |
||||
&& ( cd ${builddir}/python \ |
||||
@@ -57,7 +58,8 @@ ruby: |
||||
EPREFIX=$(exec_prefix) \ |
||||
ABS_TOP_SRCDIR=${abs_top_srcdir} \ |
||||
ABS_TOP_BUILDDIR=${abs_top_builddir} \ |
||||
- $(RUBY_MAKE_OPTIONS) RUBYARCHDIR= ) |
||||
+ $(RUBY_MAKE_OPTIONS) hdrdir="$(includedir)" \ |
||||
+ rubyhdrdir="$(includedir)" includedir="$(includedir)" RUBYARCHDIR= ) |
||||
|
||||
# rules for building the python module |
||||
python: |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
diff --git a/bindings/Makefile.am b/bindings/Makefile.am |
||||
index 3632b3c..cd1df6a 100644 |
||||
--- a/bindings/Makefile.am |
||||
+++ b/bindings/Makefile.am |
||||
@@ -69,7 +69,6 @@ python: |
||||
&& env \ |
||||
ABS_TOP_SRCDIR=${abs_top_srcdir} \ |
||||
ABS_TOP_BUILDDIR=${abs_top_builddir} \ |
||||
- LD_RUN_PATH=$(libdir) \ |
||||
$(PYTHON) ${abs_srcdir}/$@/setup.py build_ext $(PYTHON_RPATH) \ |
||||
&& env \ |
||||
ABS_TOP_SRCDIR=${abs_top_srcdir} \ |
Loading…
Reference in new issue