1 /* glibcompat.h -- declarations for functions decared in glibcompat.c,
2 i.e. functions present only in recent versions of glib.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 #ifndef __MC_GLIBCOMPAT_H
19 #define __MC_GLIBCOMPAT_H
21 #if GLIB_MAJOR_VERSION < 2
23 gsize
g_strlcpy (gchar
*dest
, const gchar
*src
, gsize dest_size
);
24 #define g_try_malloc(size) malloc(size)
25 #define g_try_realloc(ptr,size) realloc(ptr,size)
27 static inline GSList
*
28 g_slist_delete_link (GSList
*list
, GSList
*link
)
30 list
= g_slist_remove_link (list
, link
);
31 g_slist_free_1 (link
);
35 #endif /* GLIB_MAJOR_VERSION < 2 */
37 #endif /* !__MC_GLIBCOMPAT_H */