From: Bruno Haible Date: Mon, 28 Sep 2009 21:25:49 +0000 (+0200) Subject: Avoid identifier clash with POSIX function 'remove' defined as a macro. X-Git-Tag: v0.1~5406 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=e21985ad14508137d75b0dccf064adfc4e5888c6;p=gnulib.git Avoid identifier clash with POSIX function 'remove' defined as a macro. --- diff --git a/ChangeLog b/ChangeLog index e4145be45..e3694c8fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-09-28 Bruno Haible + + Avoid identifier clash with POSIX function 'remove' defined as a macro. + * lib/gl_list.h (struct gl_list_implementation): Rename field 'remove' + to 'remove_elt'. + (gl_list_remove): Update. + * lib/gl_list.c (gl_list_remove): Update. + * lib/gl_oset.h (struct gl_oset_implementation): Rename field 'remove' + to 'remove_elt'. + (gl_oset_remove): Update. + * lib/gl_list.c (gl_oset_remove): Update. + Reported by Eric Blake. + 2009-09-28 Eric Blake doc: mention yet more cygwin 1.7 status diff --git a/lib/gl_list.c b/lib/gl_list.c index 9eca9e4e3..d99ed4e26 100644 --- a/lib/gl_list.c +++ b/lib/gl_list.c @@ -1,5 +1,5 @@ /* Abstract sequential list data type. - Copyright (C) 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2006-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -197,7 +197,7 @@ bool gl_list_remove (gl_list_t list, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable - ->remove (list, elt); + ->remove_elt (list, elt); } void diff --git a/lib/gl_list.h b/lib/gl_list.h index ca4f476b3..41fdfc864 100644 --- a/lib/gl_list.h +++ b/lib/gl_list.h @@ -1,5 +1,5 @@ /* Abstract sequential list data type. - Copyright (C) 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2006-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -405,7 +405,7 @@ struct gl_list_implementation const void *elt); bool (*remove_node) (gl_list_t list, gl_list_node_t node); bool (*remove_at) (gl_list_t list, size_t position); - bool (*remove) (gl_list_t list, const void *elt); + bool (*remove_elt) (gl_list_t list, const void *elt); void (*list_free) (gl_list_t list); /* gl_list_iterator_t functions. */ gl_list_iterator_t (*iterator) (gl_list_t list); @@ -650,7 +650,7 @@ static inline bool gl_list_remove (gl_list_t list, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable - ->remove (list, elt); + ->remove_elt (list, elt); } # define gl_list_free gl_list_free_inline diff --git a/lib/gl_oset.c b/lib/gl_oset.c index 9e364f264..6ec8fb07a 100644 --- a/lib/gl_oset.c +++ b/lib/gl_oset.c @@ -1,5 +1,5 @@ /* Abstract ordered set data type. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -64,7 +64,8 @@ gl_oset_add (gl_oset_t set, const void *elt) bool gl_oset_remove (gl_oset_t set, const void *elt) { - return ((const struct gl_oset_impl_base *) set)->vtable->remove (set, elt); + return ((const struct gl_oset_impl_base *) set)->vtable + ->remove_elt (set, elt); } void diff --git a/lib/gl_oset.h b/lib/gl_oset.h index 0ecc6112c..a609a134c 100644 --- a/lib/gl_oset.h +++ b/lib/gl_oset.h @@ -1,5 +1,5 @@ /* Abstract ordered set data type. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -168,7 +168,7 @@ struct gl_oset_implementation gl_setelement_threshold_fn threshold_fn, const void *threshold, const void **eltp); bool (*add) (gl_oset_t set, const void *elt); - bool (*remove) (gl_oset_t set, const void *elt); + bool (*remove_elt) (gl_oset_t set, const void *elt); void (*oset_free) (gl_oset_t set); /* gl_oset_iterator_t functions. */ gl_oset_iterator_t (*iterator) (gl_oset_t set); @@ -233,7 +233,8 @@ gl_oset_add (gl_oset_t set, const void *elt) static inline bool gl_oset_remove (gl_oset_t set, const void *elt) { - return ((const struct gl_oset_impl_base *) set)->vtable->remove (set, elt); + return ((const struct gl_oset_impl_base *) set)->vtable + ->remove_elt (set, elt); } # define gl_oset_free gl_oset_free_inline