This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gccgo] Don't declare malloc in libgo/runtime.h


The file libgo/runtime.h is partially copied from the other Go
library.  It declares malloc.  In the gccgo context, this is harmful
is malloc winds up getting declared by a system header file such as
<sys/mman.h>.  This fixes
    http://code.google.com/p/go/issues/detail?id=356

Committed to gccgo branch.

Ian

Index: libgo/runtime/runtime.h
===================================================================
--- libgo/runtime/runtime.h	(revision 154387)
+++ libgo/runtime/runtime.h	(working copy)
@@ -87,6 +87,5 @@ struct	M
 #define sys_memclr(buf, size) __builtin_memset(buf, 0, size)
 #define sys_mmap mmap
 MCache*	allocmcache(void);
-void*	malloc(uintptr size);
 void*	mallocgc(uintptr size);
 void	free(void *v);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]