if you don't include the proper include files, you are going to end up

calling functions incorrectly.
This commit is contained in:
christos 2011-05-15 23:56:28 +00:00
parent 0648f64e9b
commit 6551109c37
3 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: director.c,v 1.3 2011/04/19 20:13:55 martin Exp $ */
/* $NetBSD: director.c,v 1.4 2011/05/15 23:56:28 christos Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn@NetBSD.org>
@ -31,13 +31,17 @@
#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
#include <termios.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <util.h>
#include <err.h>
#include "returns.h"
void yyparse(void);
#define DEF_TERMPATH "."
#define DEF_TERM "atf"
#define DEF_SLAVE "./slave"

View File

@ -1,5 +1,5 @@
%{
/* $NetBSD: testlang_conf.l,v 1.2 2011/04/11 09:03:24 blymn Exp $ */
/* $NetBSD: testlang_conf.l,v 1.3 2011/05/15 23:56:28 christos Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn@NetBSD.org>
@ -31,6 +31,7 @@
*/
#include <curses.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,5 @@
%{
/* $NetBSD: testlang_parse.y,v 1.2 2011/04/21 10:23:50 blymn Exp $ */
/* $NetBSD: testlang_parse.y,v 1.3 2011/05/15 23:56:28 christos Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn@NetBSD.org>
@ -32,6 +32,8 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <poll.h>
#include <stdbool.h>
#include <stdio.h>
@ -50,6 +52,8 @@ extern struct pollfd readfd;
extern char *check_path;
extern char *cur_file; /* from director.c */
int yylex(void);
size_t line;
static int input_delay;
@ -777,7 +781,7 @@ compare_streams(char *filename, bool discard)
*/
result = read(check_fd, &drain, 1);
if (result == -1)
err("read of data file failed");
err(1, "read of data file failed");
if (result > 0) {
fprintf(stderr, "Error: excess data "