Line 0
Link Here
|
|
|
1 |
--- rrd.c.orig 2016-01-12 12:42:39 UTC |
2 |
+++ rrd.c |
3 |
@@ -19,7 +19,9 @@ |
4 |
#include <rrd.h> |
5 |
|
6 |
#include "php_rrd.h" |
7 |
+#ifdef HAVE_RRD_GRAPH |
8 |
#include "rrd_graph.h" |
9 |
+#endif |
10 |
#include "rrd_create.h" |
11 |
#include "rrd_update.h" |
12 |
#include "rrd_info.h" |
13 |
@@ -387,6 +389,7 @@ PHP_FUNCTION(rrd_tune) |
14 |
} |
15 |
/* }}} */ |
16 |
|
17 |
+#ifdef HAVE_RRD_GRAPH |
18 |
/* {{{ proto array rrd_xport(array options) |
19 |
* Creates a graph based on options passed via an array |
20 |
*/ |
21 |
@@ -480,6 +483,7 @@ PHP_FUNCTION(rrd_xport) |
22 |
free(data); |
23 |
} |
24 |
/* }}} */ |
25 |
+#endif |
26 |
|
27 |
#ifdef HAVE_RRDC_DISCONNECT |
28 |
/* {{{ proto void rrdc_disconnect() |
29 |
@@ -537,18 +541,22 @@ ZEND_BEGIN_ARG_INFO(arginfo_rrd_tune, 0) |
30 |
ZEND_ARG_INFO(0, options) |
31 |
ZEND_END_ARG_INFO() |
32 |
|
33 |
+#ifdef HAVE_RRD_GRAPH |
34 |
ZEND_BEGIN_ARG_INFO(arginfo_rrd_xport, 0) |
35 |
ZEND_ARG_INFO(0, options) |
36 |
ZEND_END_ARG_INFO() |
37 |
+#endif |
38 |
|
39 |
ZEND_BEGIN_ARG_INFO(arginfo_rrd_info, 0) |
40 |
ZEND_ARG_INFO(0, file) |
41 |
ZEND_END_ARG_INFO() |
42 |
|
43 |
+#ifdef HAVE_RRD_GRAPH |
44 |
ZEND_BEGIN_ARG_INFO(arginfo_rrd_graph, 0) |
45 |
ZEND_ARG_INFO(0, file) |
46 |
ZEND_ARG_INFO(0, options) |
47 |
ZEND_END_ARG_INFO() |
48 |
+#endif |
49 |
|
50 |
ZEND_BEGIN_ARG_INFO(arginfo_rrd_create, 0) |
51 |
ZEND_ARG_INFO(0, filename) |
52 |
@@ -565,7 +573,9 @@ ZEND_END_ARG_INFO() |
53 |
static zend_function_entry rrd_functions[] = { |
54 |
PHP_FE(rrd_update, arginfo_rrd_update) |
55 |
PHP_FE(rrd_create, arginfo_rrd_create) |
56 |
+#ifdef HAVE_RRD_GRAPH |
57 |
PHP_FE(rrd_graph, arginfo_rrd_graph) |
58 |
+#endif |
59 |
PHP_FE(rrd_error, NULL) |
60 |
PHP_FE(rrd_fetch, arginfo_rrd_fetch) |
61 |
PHP_FE(rrd_first, arginfo_rrd_first) |
62 |
@@ -574,7 +584,9 @@ static zend_function_entry rrd_functions |
63 |
PHP_FE(rrd_lastupdate, arginfo_rrd_lastupdate) |
64 |
PHP_FE(rrd_restore, arginfo_rrd_restore) |
65 |
PHP_FE(rrd_tune, arginfo_rrd_tune) |
66 |
+#ifdef HAVE_RRD_GRAPH |
67 |
PHP_FE(rrd_xport, arginfo_rrd_xport) |
68 |
+#endif |
69 |
#ifdef HAVE_RRDC_DISCONNECT |
70 |
PHP_FE(rrdc_disconnect, NULL) |
71 |
#endif |
72 |
@@ -590,7 +602,9 @@ static zend_function_entry rrd_functions |
73 |
/* {{{ PHP_MINIT_FUNCTION */ |
74 |
static PHP_MINIT_FUNCTION(rrd) |
75 |
{ |
76 |
+#ifdef HAVE_RRD_GRAPH |
77 |
rrd_graph_minit(TSRMLS_C); |
78 |
+#endif |
79 |
rrd_create_minit(TSRMLS_C); |
80 |
rrd_update_minit(TSRMLS_C); |
81 |
return SUCCESS; |