diff -ruN glib-1.2.10.old/glib.h glib-1.2.10/glib.h --- glib-1.2.10.old/glib.h 2001-02-27 03:44:38.000000000 +0000 +++ glib-1.2.10/glib.h 2017-05-05 17:07:03.620138615 +0000 @@ -178,10 +178,15 @@ * we special case most of the stuff, so inline functions can have a normal * implementation by defining G_INLINE_FUNC to extern and G_CAN_INLINE to 1. */ -#ifndef G_INLINE_FUNC -# define G_CAN_INLINE 1 + +#ifdef G_CAN_INLINE +#undef G_CAN_INLINE #endif #ifdef G_HAVE_INLINE +#undef G_HAVE_INLINE +#endif + +#ifdef G_HAVE_INLINE # if defined (__GNUC__) && defined (__STRICT_ANSI__) # undef inline # define inline __inline__ @@ -217,7 +222,10 @@ # endif # endif /* !__GNUC__ */ #endif /* !G_INLINE_FUNC */ - +#ifdef G_INLINE_FUNC +#undef G_INLINE_FUNC +#endif +#define G_INLINE_FUNC /* Provide simple macro statement wrappers (adapted from Perl): * G_STMT_START { statements; } G_STMT_END; diff -ruN glib-1.2.10.old/gmessages.c glib-1.2.10/gmessages.c --- glib-1.2.10.old/gmessages.c 2000-10-28 04:35:30.000000000 +0000 +++ glib-1.2.10/gmessages.c 2017-05-05 17:07:38.303139470 +0000 @@ -41,6 +41,46 @@ #include #endif +gint g_bit_nth_lsf (guint32 mask, gint nth_bit) +{ + do + { + nth_bit++; + if (mask & (1 << (guint) nth_bit)) + return nth_bit; + } + while (nth_bit < 32); + return -1; +} + +gint g_bit_nth_msf (guint32 mask, + gint nth_bit) +{ + if (nth_bit < 0) + nth_bit = 32; + do + { + nth_bit--; + if (mask & (1 << (guint) nth_bit)) + return nth_bit; + } + while (nth_bit > 0); + return -1; +} + +guint g_bit_storage (guint number) +{ + register guint n_bits = 0; + + do + { + n_bits++; + number >>= 1; + } + while (number); + return n_bits; +} + #ifdef NATIVE_WIN32 #define STRICT #include