libgo: Solaris and Irix compatibility patches.

From Rainer Orth.

From-SVN: r183246
This commit is contained in:
Ian Lance Taylor 2012-01-17 14:18:39 +00:00
parent eec3e72c11
commit 1efa38d1a7
5 changed files with 10 additions and 4 deletions

1
libgo/configure vendored
View File

@ -13467,6 +13467,7 @@ is_darwin=no
is_freebsd=no
is_irix=no
is_linux=no
is_netbsd=no
is_rtems=no
is_solaris=no
GOOS=unknown

View File

@ -126,6 +126,7 @@ is_darwin=no
is_freebsd=no
is_irix=no
is_linux=no
is_netbsd=no
is_rtems=no
is_solaris=no
GOOS=unknown

View File

@ -20,7 +20,7 @@ __go_map_delete (struct __go_map *map, const void *key)
const struct __go_map_descriptor *descriptor;
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
_Bool (*equalfn) (const void*, const void*, size_t);
_Bool (*equalfn) (const void*, const void*, uintptr_t);
size_t key_hash;
size_t key_size;
size_t bucket_index;

View File

@ -21,7 +21,7 @@ __go_map_rehash (struct __go_map *map)
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
size_t key_size;
size_t (*hashfn) (const void *, size_t);
uintptr_t (*hashfn) (const void *, uintptr_t);
uintptr_t old_bucket_count;
void **old_buckets;
uintptr_t new_bucket_count;
@ -80,7 +80,7 @@ __go_map_index (struct __go_map *map, const void *key, _Bool insert)
const struct __go_map_descriptor *descriptor;
const struct __go_type_descriptor *key_descriptor;
uintptr_t key_offset;
_Bool (*equalfn) (const void*, const void*, size_t);
_Bool (*equalfn) (const void*, const void*, uintptr_t);
size_t key_hash;
size_t key_size;
size_t bucket_index;

View File

@ -1,3 +1,7 @@
/* Defining _XOPEN_SOURCE hides the declaration of madvise() on Solaris <
11 and the MADV_DONTNEED definition on IRIX 6.5. */
#undef _XOPEN_SOURCE
#include <errno.h>
#include <unistd.h>
@ -67,7 +71,7 @@ runtime_SysAlloc(uintptr n)
}
void
runtime_SysUnused(void *v, uintptr n)
runtime_SysUnused(void *v __attribute__ ((unused)), uintptr n __attribute__ ((unused)))
{
#ifdef MADV_DONTNEED
runtime_madvise(v, n, MADV_DONTNEED);