summaryrefslogtreecommitdiff
path: root/src/cmd/cc
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-12 23:38:48 -0800
committerRuss Cox <rsc@golang.org>2009-11-12 23:38:48 -0800
commitd98afc3f915fef85f2fe65295d685d6b45025333 (patch)
tree03ee7aa9e865c900f93fd08afb80e16cc368ac7f /src/cmd/cc
parentc38d2fc34ef097541ad188927dd6c2468e8bc054 (diff)
downloadgolang-d98afc3f915fef85f2fe65295d685d6b45025333.tar.gz
yet another attempt to avoid conflicts with
<stdio.h>, which we weren't even #including R=r http://codereview.appspot.com/154108
Diffstat (limited to 'src/cmd/cc')
-rw-r--r--src/cmd/cc/cc.h5
-rw-r--r--src/cmd/cc/cc.y1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/cc/cc.h b/src/cmd/cc/cc.h
index 696cdab56..93b5f8bf7 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 0ade1d162..2a34ca14d 100644
--- a/src/cmd/cc/cc.y
+++ b/src/cmd/cc/cc.y
@@ -29,6 +29,7 @@
// THE SOFTWARE.
%{
+#include <stdio.h> /* if we don't, bison will, and cc.h re-#defines getc */
#include "cc.h"
%}
%union {