[Mono-dev] shut gcc up + add string.h for memmove(3) + don't compile ipaddress_to_struct_in6_addr() when it's not needed

Robert Nagy robert at openbsd.org
Sat Apr 24 14:17:31 EDT 2010


Hey

boehm-gc.c: string.h is needed for memmove(3)
socket-io.c: ipaddress_to_struct_in6_addr() is only needed when defined(HAVE_STRUCT_IP_MREQN) || defined(HAVE_STRUCT_IP_MREQ)
method-to-ir.c: make gcc shut up because it thinks that code will never be reached
-------------- next part --------------
Index: mono/metadata/boehm-gc.c
===================================================================
--- mono/metadata/boehm-gc.c    (revision 156047)
+++ mono/metadata/boehm-gc.c    (working copy)
@@ -5,6 +5,7 @@
  * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
  */
 
+#include <string.h>
 #include "config.h"
 #define GC_I_HIDE_POINTERS
 #include <mono/metadata/gc-internal.h>
-------------- next part --------------
Index: mono/metadata/socket-io.c
===================================================================
--- mono/metadata/socket-io.c   (revision 156047)
+++ mono/metadata/socket-io.c   (working copy)
@@ -1944,7 +1944,6 @@
        
        return(inaddr);
 }
-#endif
 
 #ifdef AF_INET6
 static struct in6_addr ipaddress_to_struct_in6_addr(MonoObject *ipaddr)
@@ -1971,6 +1970,7 @@
        return(in6addr);
 }
 #endif /* AF_INET6 */
+#endif
 
 void ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal(SOCKET sock, gint32 level, gint32 name, MonoObject *obj_val, MonoArray *byte_val, gint32 int_val, gint32 *error)
 {
-------------- next part --------------
Index: mono/mini/method-to-ir.c
===================================================================
--- mono/mini/method-to-ir.c    (revision 156047)
+++ mono/mini/method-to-ir.c    (working copy)
@@ -10313,14 +10313,15 @@
        case OP_LSHR:
        case OP_LSHL:
        case OP_LSHR_UN:
+               return -1;
 #endif
 #if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_EMULATE_DIV)
        case OP_IDIV:
        case OP_IDIV_UN:
        case OP_IREM:
        case OP_IREM_UN:
+               return -1;
 #endif
-               return -1;
        default:
                return mono_op_to_op_imm (opcode);
        }


More information about the Mono-devel-list mailing list