syslog-ng source
glib.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2013 Balabit
3  * Copyright (c) 2011 Ryan Lortie
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 #ifndef COMPAT_GLIB_H_INCLUDED
25 #define COMPAT_GLIB_H_INCLUDED 1
26 
27 #include "compat/compat.h"
28 
29 #include <glib.h>
30 
31 #if ! SYSLOG_NG_HAVE_G_LIST_COPY_DEEP
32 GList *g_list_copy_deep (GList *list, GCopyFunc func, gpointer user_data);
33 #endif
34 
35 #if ! SYSLOG_NG_HAVE_G_CANONICALIZE_FILENAME
36 gchar *g_canonicalize_filename (const gchar *filename,
37  const gchar *relative_to);
38 #endif
39 
40 #if ! SYSLOG_NG_HAVE_G_PTR_ARRAY_FIND_WITH_EQUAL_FUNC
41 gboolean g_ptr_array_find_with_equal_func (GPtrArray *haystack,
42  gconstpointer needle,
43  GEqualFunc equal_func,
44  guint *index_);
45 #endif
46 
47 #if !GLIB_CHECK_VERSION(2, 54, 0)
48 #define g_base64_encode g_base64_encode_fixed
49 gchar *g_base64_encode_fixed(const guchar *data, gsize len);
50 #endif
51 
52 #if !GLIB_CHECK_VERSION(2, 40, 0)
53 #define g_hash_table_insert slng_g_hash_table_insert
54 gboolean slng_g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value);
55 #endif
56 
57 #if !GLIB_CHECK_VERSION(2, 64, 0)
58 #define g_utf8_get_char_validated g_utf8_get_char_validated_fixed
59 gunichar g_utf8_get_char_validated_fixed (const gchar *p, gssize max_len);
60 #endif
61 
62 #if !GLIB_CHECK_VERSION(2, 68, 0)
63 #define g_memdup2 g_memdup
64 #endif
65 
66 #if !GLIB_CHECK_VERSION(2, 70, 0)
67 #define g_pattern_spec_match_string g_pattern_match_string
68 #define g_pattern_spec_match g_pattern_match
69 #endif
70 
71 #endif
gunichar g_utf8_get_char_validated_fixed(const gchar *p, gssize max_len)
Definition: glib.c:289
gboolean slng_g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
Definition: glib.c:277
gboolean g_ptr_array_find_with_equal_func(GPtrArray *haystack, gconstpointer needle, GEqualFunc equal_func, guint *index_)
Definition: glib.c:63
gchar * g_base64_encode_fixed(const guchar *data, gsize len)
Definition: glib.c:244
gchar * g_canonicalize_filename(const gchar *filename, const gchar *relative_to)
Definition: glib.c:117
GList * g_list_copy_deep(GList *list, GCopyFunc func, gpointer user_data)
Definition: glib.c:38
GString * value
Definition: test_decode.c:28
struct tm key
Definition: cache.c:63