Commit 389578d7 by Ian Lance Taylor

re PR c/82922 (Request: add -Wstrict-prototypes to -Wextra as K&R style is obsolescent)

	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

From-SVN: r256437
parent cd3410cc
4b8036b3f995cdb0b99a9fa26c2af1e2420b4fa2 9705a1f4c37ad2c099e9fe6cd587d22a2a2ab2c3
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
/* errno is typically a macro. These functions set /* errno is typically a macro. These functions set
and get errno specific to the libc being used. */ 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"); void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
uintptr_t uintptr_t
GetErrno() GetErrno(void)
{ {
return (uintptr_t) errno; return (uintptr_t) errno;
} }
......
...@@ -16,11 +16,11 @@ struct walltime_ret ...@@ -16,11 +16,11 @@ struct walltime_ret
int32_t nsec; 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)); __attribute__ ((no_split_stack));
struct walltime_ret struct walltime_ret
now() now(void)
{ {
struct timespec ts; struct timespec ts;
struct walltime_ret ret; struct walltime_ret ret;
......
...@@ -55,7 +55,7 @@ enum ...@@ -55,7 +55,7 @@ enum
GO_NIL = 11 GO_NIL = 11
}; };
extern void __go_runtime_error () __attribute__ ((noreturn)); extern void __go_runtime_error (int32) __attribute__ ((noreturn));
void void
__go_runtime_error (int32 i) __go_runtime_error (int32 i)
......
...@@ -369,8 +369,6 @@ runtime_mcall(FuncVal *fv) ...@@ -369,8 +369,6 @@ runtime_mcall(FuncVal *fv)
// //
// Design doc at http://golang.org/s/go11sched. // Design doc at http://golang.org/s/go11sched.
extern bool* runtime_getCgoHasExtraM()
__asm__ (GOSYM_PREFIX "runtime.getCgoHasExtraM");
extern G* allocg(void) extern G* allocg(void)
__asm__ (GOSYM_PREFIX "runtime.allocg"); __asm__ (GOSYM_PREFIX "runtime.allocg");
...@@ -560,7 +558,7 @@ void setGContext(void) __asm__ (GOSYM_PREFIX "runtime.setGContext"); ...@@ -560,7 +558,7 @@ void setGContext(void) __asm__ (GOSYM_PREFIX "runtime.setGContext");
// setGContext sets up a new goroutine context for the current g. // setGContext sets up a new goroutine context for the current g.
void void
setGContext() setGContext(void)
{ {
int val; int val;
G *gp; G *gp;
......
...@@ -473,9 +473,7 @@ extern void typedmemmove(const Type *, void *, const void *) ...@@ -473,9 +473,7 @@ extern void typedmemmove(const Type *, void *, const void *)
__asm__ (GOSYM_PREFIX "runtime.typedmemmove"); __asm__ (GOSYM_PREFIX "runtime.typedmemmove");
extern void setncpu(int32) extern void setncpu(int32)
__asm__(GOSYM_PREFIX "runtime.setncpu"); __asm__(GOSYM_PREFIX "runtime.setncpu");
extern P** runtime_getAllP() extern Sched* runtime_getsched(void)
__asm__ (GOSYM_PREFIX "runtime.getAllP");
extern Sched* runtime_getsched()
__asm__ (GOSYM_PREFIX "runtime.getsched"); __asm__ (GOSYM_PREFIX "runtime.getsched");
extern void setpagesize(uintptr_t) extern void setpagesize(uintptr_t)
__asm__(GOSYM_PREFIX "runtime.setpagesize"); __asm__(GOSYM_PREFIX "runtime.setpagesize");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment