2005-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mono / io-layer / misc.c
index a46796c9d0eede7965e7e9d05db32bb4462011b0..82835cc52b937ac0598b8bdb4c66fed8d2bd9e9a 100644 (file)
@@ -11,6 +11,7 @@
 #include <glib.h>
 #include <sys/time.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "misc-private.h"
 
@@ -27,15 +28,3 @@ void _wapi_calc_timeout(struct timespec *timeout, guint32 ms)
        timeout->tv_sec = now.tv_sec + ms_divvy.quot + overflow_divvy.quot;
        timeout->tv_nsec = overflow_divvy.rem * 1000000;
 }
-
-/* This is used instead of g_renew when we need to keep unused
- * elements NULL, because g_renew doesn't initialize the memory it
- * returns.
- */
-gpointer _wapi_g_renew0 (gpointer mem, gulong old_len, gulong new_len)
-{
-       gpointer new_mem=g_malloc0 (new_len);
-       memcpy (new_mem, mem, old_len);
-       g_free (mem);
-       return(new_mem);
-}