runtime: include constants and defs_*_*.h types in generated Go defs

I had to rename Kevent and Sigaction to avoid the functions of the
same (lowercase) name.

LGTM=iant, r
R=golang-codereviews, r, iant, aram.h
CC=dvyukov, golang-codereviews, khr
https://golang.org/cl/140740043
This commit is contained in:
Russ Cox 2014-08-29 16:00:31 -04:00
parent 7f2e68e982
commit 9a75c74836
31 changed files with 91 additions and 77 deletions

View file

@ -263,12 +263,12 @@ typedef struct sigaction {
} __sigaction_u; /* signal handler */
uint32 sa_mask; /* signal mask to apply */
int32 sa_flags; /* see signal options below */
} Sigaction;
} SigactionT;
void
runtime·setsig(int32 i, GoSighandler *fn, bool restart)
{
Sigaction sa;
SigactionT sa;
runtime·memclr((byte*)&sa, sizeof sa);
sa.sa_flags = SA_SIGINFO|SA_ONSTACK;
@ -284,7 +284,7 @@ runtime·setsig(int32 i, GoSighandler *fn, bool restart)
GoSighandler*
runtime·getsig(int32 i)
{
Sigaction sa;
SigactionT sa;
runtime·memclr((byte*)&sa, sizeof sa);
runtime·sigaction(i, nil, &sa);