1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
$NetBSD: patch-af,v 1.2 2005/05/15 16:38:28 bouyer Exp $
hit with big hammer. Unfortunately awk.h #define's proc which
breaks 'struct proc' so we make sure we pull all that stuff in first.
--- io.c.orig Tue Apr 16 07:57:44 2002
+++ io.c
@@ -23,6 +23,38 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+
+#include <arpa/ftp.h>
+#include <arpa/inet.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <netdb.h>
+#include <pwd.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#endif
+
#include "awk.h"
#ifdef HAVE_SYS_PARAM_H
@@ -2024,7 +2056,6 @@
int pid;
int status = 0;
struct redirect *redp;
- extern int errno;
hstat = signal(SIGHUP, SIG_IGN);
istat = signal(SIGINT, SIG_IGN);
@@ -2205,7 +2236,6 @@
static IOBUF *
gawk_popen(const char *cmd, struct redirect *rp)
{
- extern char *strdup P((const char *));
int current;
char *name;
static char cmdbuf[256];
|