Merge pull request #409 from Alkarex/patch-1
[mono.git] / eglib / src / glib.h
index 1f7c582a9d32c728e898d8aef38357dab9e96529..6d6dadff448c31b9b07cf6ab691b0c4f8a6624f1 100644 (file)
@@ -110,6 +110,9 @@ typedef guint32 gunichar;
 #define FALSE                0
 #define TRUE                 1
 
+#define G_MINSHORT           SHRT_MIN
+#define G_MAXSHORT           SHRT_MAX
+#define G_MAXUSHORT          USHRT_MAX
 #define G_MAXINT             INT_MAX
 #define G_MININT             INT_MIN
 #define G_MAXINT32           INT32_MAX
@@ -126,7 +129,9 @@ typedef guint32 gunichar;
 
 #define G_USEC_PER_SEC  1000000
 
+#ifndef ABS
 #define ABS(a)         ((a) > 0 ? (a) : -(a))
+#endif
 
 #define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field)
 
@@ -746,6 +751,7 @@ gint       g_unichar_to_utf8 (gunichar c, gchar *outbuf);
 gunichar  *g_utf8_to_ucs4_fast (const gchar *str, glong len, glong *items_written);
 gunichar  *g_utf8_to_ucs4 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
 gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
+gunichar2 *eg_utf8_to_utf16_with_nuls (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
 gchar     *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err);
 gunichar  *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err);
 gchar     *g_ucs4_to_utf8  (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err);