mirror of
https://github.com/golang/go
synced 2024-11-12 08:20:22 -07:00
liblink: fix arm build again
Another attempt to fix the arm build by moving the include of signal.h to cmd/lex.c, unless we are building on plan9. Obviously if we had a plan9/arm builder this would probably not work, but this is only a temporary measure until the c2go transition is complete. Change-Id: I7f8ae27349b2e7a09c55db03e02a01939159a268 Reviewed-on: https://go-review.googlesource.com/3566 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
3c3848ad92
commit
ea2f3f9e7a
@ -69,9 +69,12 @@ extern "C" {
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <ctype.h> /* for tolower */
|
#include <ctype.h> /* for tolower */
|
||||||
#include <signal.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#ifndef PLAN9
|
||||||
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OS-specific crap
|
* OS-specific crap
|
||||||
*/
|
*/
|
||||||
|
@ -40,40 +40,6 @@ enum
|
|||||||
#define REGARG -1
|
#define REGARG -1
|
||||||
/*c2go enum { REGARG = -1 }; */
|
/*c2go enum { REGARG = -1 }; */
|
||||||
|
|
||||||
// avoid conflict with ucontext.h. sigh.
|
|
||||||
#undef REG_R0
|
|
||||||
#undef REG_R1
|
|
||||||
#undef REG_R2
|
|
||||||
#undef REG_R3
|
|
||||||
#undef REG_R4
|
|
||||||
#undef REG_R5
|
|
||||||
#undef REG_R6
|
|
||||||
#undef REG_R7
|
|
||||||
#undef REG_R8
|
|
||||||
#undef REG_R9
|
|
||||||
#undef REG_R10
|
|
||||||
#undef REG_R11
|
|
||||||
#undef REG_R12
|
|
||||||
#undef REG_R13
|
|
||||||
#undef REG_R14
|
|
||||||
#undef REG_R15
|
|
||||||
#define REG_R0 GO_REG_R0
|
|
||||||
#define REG_R1 GO_REG_R1
|
|
||||||
#define REG_R2 GO_REG_R2
|
|
||||||
#define REG_R3 GO_REG_R3
|
|
||||||
#define REG_R4 GO_REG_R4
|
|
||||||
#define REG_R5 GO_REG_R5
|
|
||||||
#define REG_R6 GO_REG_R6
|
|
||||||
#define REG_R7 GO_REG_R7
|
|
||||||
#define REG_R8 GO_REG_R8
|
|
||||||
#define REG_R9 GO_REG_R9
|
|
||||||
#define REG_R10 GO_REG_R10
|
|
||||||
#define REG_R11 GO_REG_R11
|
|
||||||
#define REG_R12 GO_REG_R12
|
|
||||||
#define REG_R13 GO_REG_R13
|
|
||||||
#define REG_R14 GO_REG_R14
|
|
||||||
#define REG_R15 GO_REG_R15
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
REG_R0 = 32, // must be 16-aligned
|
REG_R0 = 32, // must be 16-aligned
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#include "y.tab.h"
|
#include "y.tab.h"
|
||||||
#include <ar.h>
|
#include <ar.h>
|
||||||
|
|
||||||
|
#ifndef PLAN9
|
||||||
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef getc
|
#undef getc
|
||||||
#undef ungetc
|
#undef ungetc
|
||||||
#define getc ccgetc
|
#define getc ccgetc
|
||||||
@ -1275,7 +1279,7 @@ talph:
|
|||||||
if(c >= Runeself) {
|
if(c >= Runeself) {
|
||||||
ungetc(c);
|
ungetc(c);
|
||||||
rune = getr();
|
rune = getr();
|
||||||
// 0xb7 · is used for internal names
|
// 0xb7 · is used for internal names
|
||||||
if(!isalpharune(rune) && !isdigitrune(rune) && (importpkg == nil || rune != 0xb7))
|
if(!isalpharune(rune) && !isdigitrune(rune) && (importpkg == nil || rune != 0xb7))
|
||||||
yyerror("invalid identifier character U+%04x", rune);
|
yyerror("invalid identifier character U+%04x", rune);
|
||||||
cp += runetochar(cp, &rune);
|
cp += runetochar(cp, &rune);
|
||||||
|
Loading…
Reference in New Issue
Block a user