Index: config.m4 =================================================================== --- config.m4 (révision 332618) +++ config.m4 (copie de travail) @@ -67,6 +67,9 @@ dnl rrd_lastupdate_r available in 1.4.0+ PHP_CHECK_FUNC(rrd_lastupdate_r, rrd) + dnl rrd_disconnect available in 1.4.0+ + PHP_CHECK_FUNC(rrdc_disconnect, rrd) + LDFLAGS=$old_LDFLAGS PHP_NEW_EXTENSION(rrd, rrd.c rrd_graph.c rrd_create.c rrd_update.c rrd_info.c, $ext_shared) Index: rrd.c =================================================================== --- rrd.c (révision 332618) +++ rrd.c (copie de travail) @@ -481,6 +481,7 @@ } /* }}} */ +#ifdef HAVE_RRDC_DISCONNECT /* {{{ proto void rrdc_disconnect() * Close any outstanding connection to rrd cache daemon. */ @@ -492,6 +493,7 @@ rrdc_disconnect(); } +#endif /* {{{ proto string rrd_version() * Gets version of underlying librrd. @@ -573,7 +575,9 @@ PHP_FE(rrd_restore, arginfo_rrd_restore) PHP_FE(rrd_tune, arginfo_rrd_tune) PHP_FE(rrd_xport, arginfo_rrd_xport) +#ifdef HAVE_RRDC_DISCONNECT PHP_FE(rrdc_disconnect, NULL) +#endif PHP_FE(rrd_version, NULL) {NULL, NULL, NULL} }; @@ -609,7 +613,9 @@ static PHP_MSHUTDOWN_FUNCTION(rrd) { /* ensure that any connection to rrd cache deamon will be closed */ +#ifdef HAVE_RRDC_DISCONNECT rrdc_disconnect(); +#endif return SUCCESS; } /* }}} */ Index: tests/rrd_012.phpt =================================================================== --- tests/rrd_012.phpt (révision 332618) +++ tests/rrd_012.phpt (copie de travail) @@ -11,6 +11,8 @@ --FILE-- Index: tests/rrd_022.phpt =================================================================== --- tests/rrd_022.phpt (révision 332618) +++ tests/rrd_022.phpt (copie de travail) @@ -1,7 +1,13 @@ --TEST-- rrdc_disconnect test --SKIPIF-- - += 1.4"); +} + +?> --FILE--