diff options
author | Lucio De Re <lucio.dere@gmail.com> | 2011-07-15 11:58:28 -0400 |
---|---|---|
committer | Lucio De Re <lucio.dere@gmail.com> | 2011-07-15 11:58:28 -0400 |
commit | 8daca2af71be60bc6d8849b1e5ce6440c2b2a7a2 (patch) | |
tree | acf837f111ed89a414a5dbaf016226257ef48c45 /src/cmd/5a | |
parent | 5762c955870a309d3d97535da69a303ad214d475 (diff) | |
download | go-8daca2af71be60bc6d8849b1e5ce6440c2b2a7a2.tar.gz |
5a, 5c, 5l: fix for Plan 9 build
5a/a.h:
. Removed <u.h> and <lib.h>.
. Made definition of EOF conditional.
5a/a.y:
. Added <u.h> and <lib.h>.
5a/lex.c:
. Added <u.h> and <lib.h>.
. Dropped <ctype.h> (now in <u.h>).
5c/peep.c:
. Removed unnecessary "return 0" statement.
5c/reg.c:
. Added compilation condition around unused code.
5c/swt.c:
. Removed unused "thestring" argument from Bprint() calls.
5l/asm.c:
. Added USED() statements as required.
. Adjusted a few format specifications.
. Added compilation condition around unused code.
5l/l.h:
. Dropped directory prefix from <../5l/5.out.h>.
. Added varargck pragma for "I" and "i".
5l/obj.c:
. Cascaded consecutive "if" statements.
. Dropped unnecessary incrementation and assignments.
5l/pass.c:
. Dropped unnecessary assignment.
5l/prof.c:
. #if 0 converted to #ifdef NOTDEF.
5l/span.c:
. Dropped unnecessary incrementation and assignments.
R=golang-dev
CC=golang-dev, rsc
http://codereview.appspot.com/4752041
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/5a')
-rw-r--r-- | src/cmd/5a/a.h | 4 | ||||
-rw-r--r-- | src/cmd/5a/a.y | 2 | ||||
-rw-r--r-- | src/cmd/5a/lex.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd/5a/a.h b/src/cmd/5a/a.h index 550b61dcf..a2c87cf48 100644 --- a/src/cmd/5a/a.h +++ b/src/cmd/5a/a.h @@ -28,8 +28,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#include <u.h> -#include <libc.h> #include <bio.h> #include "../5l/5.out.h" @@ -54,7 +52,9 @@ typedef struct Hist Hist; #define NSYMB 8192 #define BUFSIZ 8192 #define HISTSZ 20 +#ifndef EOF #define EOF (-1) +#endif #define IGN (-2) #define GETC() ((--fi.c < 0)? filbuf(): *fi.p++ & 0xff) #define NHASH 503 diff --git a/src/cmd/5a/a.y b/src/cmd/5a/a.y index b39c916ab..9a0efd5e0 100644 --- a/src/cmd/5a/a.y +++ b/src/cmd/5a/a.y @@ -29,7 +29,9 @@ // THE SOFTWARE. %{ +#include <u.h> #include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */ +#include <libc.h> #include "a.h" %} %union diff --git a/src/cmd/5a/lex.c b/src/cmd/5a/lex.c index 3978f1a6c..ad7ed05dd 100644 --- a/src/cmd/5a/lex.c +++ b/src/cmd/5a/lex.c @@ -29,9 +29,10 @@ // THE SOFTWARE. #define EXTERN +#include <u.h> +#include <libc.h> #include "a.h" #include "y.tab.h" -#include <ctype.h> enum { |