getcwd: fix test failures on mingw
[gnulib.git] / lib / gl_xoset.c
1 /* Abstract ordered set data type, with out-of-memory checking.
2    Copyright (C) 2009-2011 Free Software Foundation, Inc.
3    Written by Bruno Haible <bruno@clisp.org>, 2009.
4
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #include <config.h>
19
20 /* Specification.  */
21 #include "gl_xoset.h"
22
23 #if !HAVE_INLINE
24
25 gl_oset_t
26 gl_oset_create_empty (gl_oset_implementation_t implementation,
27                       gl_setelement_compar_fn compar_fn,
28                       gl_setelement_dispose_fn dispose_fn)
29 {
30   gl_oset_t result =
31     gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
32   if (result == NULL)
33     xalloc_die ();
34   return result;
35 }
36
37 bool
38 gl_oset_add (gl_oset_t set, const void *elt)
39 {
40   int result = gl_oset_nx_add (set, elt);
41   if (result < 0)
42     xalloc_die ();
43   return result;
44 }
45
46 #endif