| @@ -1,53 +1,58 @@ | | | @@ -1,53 +1,58 @@ |
1 | $NetBSD: patch-aa,v 1.7 2013/01/11 23:28:36 joerg Exp $ | | 1 | $NetBSD: patch-aa,v 1.8 2013/08/30 16:54:07 joerg Exp $ |
2 | | | 2 | |
3 | --- ile.c.orig 1993-06-09 03:12:33.000000000 +0000 | | 3 | --- ile.c.orig 1993-06-09 03:12:33.000000000 +0000 |
4 | +++ ile.c | | 4 | +++ ile.c |
5 | @@ -2,6 +2,9 @@ | | 5 | @@ -2,6 +2,11 @@ |
6 | /* Copyright message is near the bottom of the file */ | | 6 | /* Copyright message is near the bottom of the file */ |
7 | | | 7 | |
8 | #include "config.h" | | 8 | #include "config.h" |
9 | +#include <signal.h> | | 9 | +#include <signal.h> |
10 | +#include <ctype.h> | | 10 | +#include <ctype.h> |
| | | 11 | +#include <time.h> |
| | | 12 | +#include <termios.h> |
11 | +#include <unistd.h> | | 13 | +#include <unistd.h> |
12 | | | 14 | |
13 | /* #define DEBUG /**/ | | 15 | /* #define DEBUG /**/ |
14 | | | 16 | |
15 | @@ -43,7 +46,7 @@ void setup_action_table(); | | 17 | @@ -43,7 +48,7 @@ void setup_action_table(); |
16 | #include <stdio.h> | | 18 | #include <stdio.h> |
17 | #include <fcntl.h> | | 19 | #include <fcntl.h> |
18 | #include <sgtty.h> | | 20 | #include <sgtty.h> |
19 | -#include <signal.h> | | 21 | -#include <signal.h> |
20 | +#include <stdlib.h> | | 22 | +#include <stdlib.h> |
21 | #include <string.h> | | 23 | #include <string.h> |
22 | #include <strings.h> | | 24 | #include <strings.h> |
23 | #include <pwd.h> | | 25 | #include <pwd.h> |
24 | @@ -51,7 +54,7 @@ void setup_action_table(); | | 26 | @@ -51,7 +56,7 @@ void setup_action_table(); |
25 | #include <errno.h> | | 27 | #include <errno.h> |
26 | #include <sys/ioctl.h> | | 28 | #include <sys/ioctl.h> |
27 | #include <sys/types.h> | | 29 | #include <sys/types.h> |
28 | -#include <sys/dir.h> | | 30 | -#include <sys/dir.h> |
29 | +#include <dirent.h> | | 31 | +#include <dirent.h> |
30 | #include <sys/file.h> | | 32 | #include <sys/file.h> |
31 | #include <sys/time.h> | | 33 | #include <sys/time.h> |
32 | #include <sys/wait.h> | | 34 | #include <sys/wait.h> |
33 | @@ -61,11 +64,6 @@ void setup_action_table(); | | 35 | @@ -60,14 +65,6 @@ void setup_action_table(); |
| | | 36 | #include <sys/ttold.h> |
34 | */ | | 37 | */ |
35 | | | 38 | |
36 | /* Definitions of system stuff. */ | | 39 | -/* Definitions of system stuff. */ |
37 | -extern int errno; | | 40 | -extern int errno; |
38 | - | | 41 | - |
39 | -long lseek(); | | 42 | -long lseek(); |
40 | -char *malloc(); | | 43 | -char *malloc(); |
41 | -char *realloc(); | | 44 | -char *realloc(); |
42 | time_t time(); | | 45 | -time_t time(); |
43 | | | 46 | - |
44 | #ifndef TRUE | | 47 | #ifndef TRUE |
45 | @@ -312,7 +310,7 @@ void handle_child() { | | 48 | # define FALSE 0 |
| | | 49 | # define TRUE 1 |
| | | 50 | @@ -312,7 +309,7 @@ void handle_child() { |
46 | getpty opens a pty, storing file descriptors in pty and tty. | | 51 | getpty opens a pty, storing file descriptors in pty and tty. |
47 | It trys pairs in order until it finds a pair that is not in use. | | 52 | It trys pairs in order until it finds a pair that is not in use. |
48 | */ | | 53 | */ |
49 | -getpty(pty, tty) int *pty; int *tty; { | | 54 | -getpty(pty, tty) int *pty; int *tty; { |
50 | +static void getpty(pty, tty) int *pty; int *tty; { | | 55 | +static void getpty(pty, tty) int *pty; int *tty; { |
51 | int devindex; | | 56 | int devindex; |
52 | int letter; | | 57 | int letter; |
53 | | | 58 | |