Hi,
I've attached a patch that might suit - however I am a bit unsure about
modifying a non-leaf package, such as GSL.
Most of the references to delete were of the form xxx_delete, which are
not relevant to the current problem (as this does not conflict with the
C++ operator). The only externally visible (in header files) clash that
I could find was in the gsl_movstat.h file. This is referenced in a few
files in movstat/ internally, and needed to be adjusted.
This fixes the problem for me, and can be used as a patch in the debian
gsl git, c3eee7ef (as a file in debian/patches/). I've rebuilt the .deb
on a VM, and made a few quick tests using g++.
Thanks!
--- a/movstat/apply.c
+++ b/movstat/apply.c
@@ -91,7 +91,7 @@
for (i = 0; i < H; ++i)
(accum->insert)(x1, w->state);
}
- else if (accum->delete == NULL) /* FIXME XXX */
+ else if (accum->del== NULL) /* FIXME XXX */
{
/* save last K - 1 samples of x for later (needed for in-place
input/output) */
int idx1 = GSL_MAX(n - J - H, 0);
@@ -125,7 +125,7 @@
int idx1 = GSL_MAX(n - J, 0);
int idx2 = n - 1;
- if (accum->delete == NULL)
+ if (accum->del== NULL)
{
int wsize = n - GSL_MAX(n - J - H, 0); /* size of work array */
@@ -154,7 +154,7 @@
if (i - H > 0)
{
/* delete oldest window sample as we move closer to edge
*/
- (accum->delete)(w->state);
+ (accum->del)(w->state);
}
/* yi = acc_get [ work(i:K-2) ] */
--- a/movstat/gsl_movstat.h
+++ b/movstat/gsl_movstat.h
@@ -55,7 +55,7 @@
size_t (*size) (const size_t n);
int (*init) (const size_t n, void * vstate);
int (*insert) (const double x, void * vstate);
- int (*delete) (void * vstate);
+ int (*del) (void * vstate);
int (*get) (void * params, double * result, const void * vstate);
} gsl_movstat_accum;
--- a/filter/rmedian.c
+++ b/filter/rmedian.c
@@ -188,7 +188,7 @@
rmedian_delete(void * vstate)
{
rmedian_state_t * state = (rmedian_state_t *) vstate;
- return (state->minmax_acc->delete)(state->minmax_state);
+ return (state->minmax_acc->del)(state->minmax_state);
}
static int