Add g_strcmp0 to compat, it's Glib 2.16
This commit is contained in:
parent
3f78fc132e
commit
a08b760d4e
2 changed files with 26 additions and 0 deletions
|
@ -11,6 +11,24 @@
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 16, 0)
|
||||
|
||||
/* Glib string function
|
||||
Copyright (C) 2008 Tim Janik <timj@imendio.com>
|
||||
Copied from Glib 2.16, coding style adjusted */
|
||||
gint
|
||||
g_strcmp0 (const gchar* string1,
|
||||
const gchar* string2)
|
||||
{
|
||||
if (!string1)
|
||||
return -(str1 != str2);
|
||||
if (!string2)
|
||||
return string1 != string2;
|
||||
return strcmp (string1, string2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if !GTK_CHECK_VERSION(2, 14, 0)
|
||||
|
||||
#if HAVE_GIO
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 16, 0)
|
||||
|
||||
gint
|
||||
g_strcmp0 (const gchar* string1,
|
||||
const gchar* string2);
|
||||
|
||||
#endif
|
||||
|
||||
#if !GTK_CHECK_VERSION(2, 14, 0)
|
||||
|
||||
#if HAVE_GIO
|
||||
|
|
Loading…
Reference in a new issue