diff --git a/src/cmd/5a/a.h b/src/cmd/5a/a.h index 86dbac26b6..34591817f6 100644 --- a/src/cmd/5a/a.h +++ b/src/cmd/5a/a.h @@ -37,10 +37,13 @@ #define EXTERN extern #endif -#define getc aagetc -#define ungetc aaungetc +#undef getc +#undef ungetc #undef BUFSIZ +#define getc ccgetc +#define ungetc ccungetc + typedef struct Sym Sym; typedef struct Gen Gen; typedef struct Io Io; diff --git a/src/cmd/5a/a.y b/src/cmd/5a/a.y index a1de1ea5a4..bb30ac698a 100644 --- a/src/cmd/5a/a.y +++ b/src/cmd/5a/a.y @@ -29,6 +29,7 @@ // THE SOFTWARE. %{ +#include /* if we don't, bison will, and a.h re-#defines getc */ #include "a.h" %} %union diff --git a/src/cmd/6a/a.h b/src/cmd/6a/a.h index ce2ab29227..11ace63899 100644 --- a/src/cmd/6a/a.h +++ b/src/cmd/6a/a.h @@ -38,10 +38,13 @@ #define EXTERN extern #endif -#define getc aagetc -#define ungetc aaungetc +#undef getc +#undef ungetc #undef BUFSIZ +#define getc ccgetc +#define ungetc ccungetc + typedef struct Sym Sym; typedef struct Ref Ref; typedef struct Gen Gen; diff --git a/src/cmd/6a/a.y b/src/cmd/6a/a.y index a6d755d043..c48246072d 100644 --- a/src/cmd/6a/a.y +++ b/src/cmd/6a/a.y @@ -29,6 +29,7 @@ // THE SOFTWARE. %{ +#include /* if we don't, bison will, and a.h re-#defines getc */ #include "a.h" %} %union { diff --git a/src/cmd/8a/a.h b/src/cmd/8a/a.h index 37b175c189..bf0fc77083 100644 --- a/src/cmd/8a/a.h +++ b/src/cmd/8a/a.h @@ -38,10 +38,13 @@ #define EXTERN extern #endif -#define getc aagetc -#define ungetc aaungetc +#undef getc +#undef ungetc #undef BUFSIZ +#define getc ccgetc +#define ungetc ccungetc + typedef struct Sym Sym; typedef struct Ref Ref; typedef struct Gen Gen; diff --git a/src/cmd/8a/a.y b/src/cmd/8a/a.y index 3fded981f1..8bc96cce53 100644 --- a/src/cmd/8a/a.y +++ b/src/cmd/8a/a.y @@ -29,6 +29,7 @@ // THE SOFTWARE. %{ +#include /* if we don't, bison will, and a.h re-#defines getc */ #include "a.h" %} %union { diff --git a/src/cmd/cc/cc.h b/src/cmd/cc/cc.h index 696cdab567..93b5f8bf79 100644 --- a/src/cmd/cc/cc.h +++ b/src/cmd/cc/cc.h @@ -39,9 +39,12 @@ #define EXTERN extern #endif +#undef getc +#undef ungetc +#undef BUFSIZ + #define getc ccgetc #define ungetc ccungetc -#undef BUFSIZ typedef struct Node Node; typedef struct Sym Sym; diff --git a/src/cmd/cc/cc.y b/src/cmd/cc/cc.y index 0ade1d162c..2a34ca14d7 100644 --- a/src/cmd/cc/cc.y +++ b/src/cmd/cc/cc.y @@ -29,6 +29,7 @@ // THE SOFTWARE. %{ +#include /* if we don't, bison will, and cc.h re-#defines getc */ #include "cc.h" %} %union { diff --git a/src/cmd/gc/go.h b/src/cmd/gc/go.h index 33f93b7d77..cf7862e76d 100644 --- a/src/cmd/gc/go.h +++ b/src/cmd/gc/go.h @@ -14,11 +14,13 @@ #define EXTERN extern #endif - -#define getc gcgetc -#define ungetc gcungetc +#undef getc +#undef ungetc #undef BUFSIZ +#define getc ccgetc +#define ungetc ccungetc + enum { NHUNK = 50000, diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index 61ead2d3bb..79c720a648 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -18,6 +18,7 @@ */ %{ +#include /* if we don't, bison will, and go.h re-#defines getc */ #include "go.h" %} %union {