summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-10 15:42:23 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-10 15:42:23 +0000
commit86b4a2e6af4dc70bc26935e04761cfefa32e8c96 (patch)
tree4591603963109113adf2823a973632dfe302707f /libgo
parentb9b6ac72708032002e24c89c3c8bafafa50b12f4 (diff)
downloadgcc-86b4a2e6af4dc70bc26935e04761cfefa32e8c96.tar.gz
PR c/82922
runtime, syscall: use full prototypes in C code Based on patch by Martin Sebor. Reviewed-on: https://go-review.googlesource.com/86815 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256437 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/syscall/errno.c4
-rw-r--r--libgo/runtime/go-now.c4
-rw-r--r--libgo/runtime/go-runtime-error.c2
-rw-r--r--libgo/runtime/proc.c4
-rw-r--r--libgo/runtime/runtime.h4
5 files changed, 7 insertions, 11 deletions
diff --git a/libgo/go/syscall/errno.c b/libgo/go/syscall/errno.c
index 5cdc7730445..1e822f108cc 100644
--- a/libgo/go/syscall/errno.c
+++ b/libgo/go/syscall/errno.c
@@ -11,11 +11,11 @@
/* errno is typically a macro. These functions set
and get errno specific to the libc being used. */
-uintptr_t GetErrno() __asm__ (GOSYM_PREFIX "syscall.GetErrno");
+uintptr_t GetErrno(void) __asm__ (GOSYM_PREFIX "syscall.GetErrno");
void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
uintptr_t
-GetErrno()
+GetErrno(void)
{
return (uintptr_t) errno;
}
diff --git a/libgo/runtime/go-now.c b/libgo/runtime/go-now.c
index 13e8f517722..a45890bfd5a 100644
--- a/libgo/runtime/go-now.c
+++ b/libgo/runtime/go-now.c
@@ -16,11 +16,11 @@ struct walltime_ret
int32_t nsec;
};
-struct walltime_ret now() __asm__ (GOSYM_PREFIX "runtime.walltime")
+struct walltime_ret now(void) __asm__ (GOSYM_PREFIX "runtime.walltime")
__attribute__ ((no_split_stack));
struct walltime_ret
-now()
+now(void)
{
struct timespec ts;
struct walltime_ret ret;
diff --git a/libgo/runtime/go-runtime-error.c b/libgo/runtime/go-runtime-error.c
index 4f563fc9ed5..5edbeebdcf4 100644
--- a/libgo/runtime/go-runtime-error.c
+++ b/libgo/runtime/go-runtime-error.c
@@ -55,7 +55,7 @@ enum
GO_NIL = 11
};
-extern void __go_runtime_error () __attribute__ ((noreturn));
+extern void __go_runtime_error (int32) __attribute__ ((noreturn));
void
__go_runtime_error (int32 i)
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 6d2adb8f791..556d86fb7d6 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -369,8 +369,6 @@ runtime_mcall(FuncVal *fv)
//
// Design doc at http://golang.org/s/go11sched.
-extern bool* runtime_getCgoHasExtraM()
- __asm__ (GOSYM_PREFIX "runtime.getCgoHasExtraM");
extern G* allocg(void)
__asm__ (GOSYM_PREFIX "runtime.allocg");
@@ -560,7 +558,7 @@ void setGContext(void) __asm__ (GOSYM_PREFIX "runtime.setGContext");
// setGContext sets up a new goroutine context for the current g.
void
-setGContext()
+setGContext(void)
{
int val;
G *gp;
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index 4124e9dc0a9..28d550deee5 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -473,9 +473,7 @@ extern void typedmemmove(const Type *, void *, const void *)
__asm__ (GOSYM_PREFIX "runtime.typedmemmove");
extern void setncpu(int32)
__asm__(GOSYM_PREFIX "runtime.setncpu");
-extern P** runtime_getAllP()
- __asm__ (GOSYM_PREFIX "runtime.getAllP");
-extern Sched* runtime_getsched()
+extern Sched* runtime_getsched(void)
__asm__ (GOSYM_PREFIX "runtime.getsched");
extern void setpagesize(uintptr_t)
__asm__(GOSYM_PREFIX "runtime.setpagesize");