1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-21 03:14:16 -04:00

Drop some glib version checks that are not needed anymore

The g_strcmp0 fallback in particular was broken since it was used in a
few places as a GCompareFunc, and macros don't work that way.

Yes, that one was my fault, but nobody complained :D
This commit is contained in:
dequis 2015-09-23 13:42:00 -03:00
parent e833521cef
commit 9da445ab86
2 changed files with 0 additions and 24 deletions

View File

@ -43,19 +43,6 @@
# include <gmodule.h>
#endif
#if !GLIB_CHECK_VERSION(2,10,0)
#define g_slice_alloc(size) g_malloc(size)
#define g_slice_alloc0(size) g_malloc0(size)
#define g_slice_free1(size, mem) g_free(mem)
#define g_slice_new(type) g_new(type, 1)
#define g_slice_new0(type) g_new0(type, 1)
#define g_slice_free(type, mem) g_free(mem)
#endif
#if !GLIB_CHECK_VERSION(2,16,0)
#define g_strcmp0(a, b) (!a ? -(a != b) : (!b ? (a != b) : strcmp(a, b)))
#endif
#if defined (UOFF_T_INT)
typedef unsigned int uoff_t;
#elif defined (UOFF_T_LONG)

View File

@ -450,18 +450,7 @@ void fe_common_core_finish_init(void)
signal_add_first("setup changed", (SIGNAL_FUNC) sig_setup_changed);
/* _after_ windows are created.. */
#if GLIB_CHECK_VERSION(2,6,0)
g_log_set_default_handler((GLogFunc) glog_func, NULL);
#else
g_log_set_handler(G_LOG_DOMAIN,
(GLogLevelFlags) (G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING),
(GLogFunc) glog_func, NULL);
g_log_set_handler("GLib",
(GLogLevelFlags) (G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING),
(GLogFunc) glog_func, NULL); /* send glib errors to the same place */
#endif
if (setup_changed)
signal_emit("setup changed", 0);