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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
$NetBSD: patch-aa,v 1.3 2000/04/21 08:52:49 bouyer Exp $
Index: common/constants.h
===================================================================
RCS file: /cvsroot/cscope/cscope/common/constants.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 constants.h
--- common/constants.h 2000/04/18 13:16:41 1.1.1.1
+++ common/constants.h 2000/04/20 06:59:58
@@ -127,19 +127,22 @@
#endif
#if !TERMINFO
+#ifndef __NetBSD__
#define KEY_BREAK 0400 /* easier to define than to add #if around the use */
#define KEY_ENTER 0401
#define KEY_BACKSPACE 0402
-
+#endif
#if !sun
#define cbreak() crmode() /* name change */
#endif
+#ifndef __NetBSD__
#if UNIXPC
#define erasechar() (_tty.c_cc[VERASE]) /* equivalent */
#define killchar() (_tty.c_cc[VKILL]) /* equivalent */
#else
#define erasechar() (_tty.sg_erase) /* equivalent */
#define killchar() (_tty.sg_kill) /* equivalent */
+#endif
#endif
#endif
Index: common/display.c
===================================================================
RCS file: /cvsroot/cscope/cscope/common/display.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 display.c
--- common/display.c 2000/04/18 13:16:42 1.1.1.1
+++ common/display.c 2000/04/20 06:59:58
@@ -43,4 +43,7 @@
#endif
#include <curses.h> /* LINES, COLS */
#include <setjmp.h> /* jmp_buf */
+#ifdef __NetBSD__
+#include <errno.h>
+#endif
Index: common/exec.c
===================================================================
RCS file: /cvsroot/cscope/cscope/common/exec.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exec.c
--- common/exec.c 2000/04/18 13:16:42 1.1.1.1
+++ common/exec.c 2000/04/20 06:59:59
@@ -37,6 +37,10 @@
#include "global.h"
#include <stdarg.h>
+#ifdef __NetBSD__
+#include <sys/wait.h>
+#else
#include <wait.h>
+#endif
#include <curses.h>
@@ -46,7 +50,9 @@
static SIGTYPE (*oldsighup)(); /* old value of hangup signal */
static SIGTYPE (*oldsigstp)();
+#ifndef __NetBSD__
typedef int pid_t;
+#endif
static int join(), myexecvp();
static pid_t myfork();
Index: common/global.h
===================================================================
RCS file: /cvsroot/cscope/cscope/common/global.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 global.h
--- common/global.h 2000/04/18 13:16:43 1.1.1.1
+++ common/global.h 2000/04/20 06:59:59
@@ -46,10 +46,14 @@
#include "invlib.h" /* inverted index library */
#include "library.h" /* library function return values */
+#ifdef __NetBSD__
+#define SIGTYPE void
+#else
#if SVR2 || BSD && !sun
#define SIGTYPE int
#else
#define SIGTYPE void
+#endif
#endif
typedef enum { /* boolean data type */
Index: common/help.c
===================================================================
RCS file: /cvsroot/cscope/cscope/common/help.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 help.c
--- common/help.c 2000/04/18 13:16:43 1.1.1.1
+++ common/help.c 2000/04/20 06:59:59
@@ -132,6 +132,7 @@
++ln;
}
}
+ move(ln, 0);
(void) addstr(*tp++);
}
else {
Index: common/input.c
===================================================================
RCS file: /cvsroot/cscope/cscope/common/input.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 input.c
--- common/input.c 2000/04/18 13:16:43 1.1.1.1
+++ common/input.c 2000/04/20 06:59:59
@@ -38,4 +38,7 @@
#include "global.h"
#include <curses.h>
#include <setjmp.h> /* jmp_buf */
+#ifdef __NetBSD__
+#include <termios.h>
+#endif
Index: common/library.h
===================================================================
RCS file: /cvsroot/cscope/cscope/common/library.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 library.h
--- common/library.h 2000/04/18 13:16:43 1.1.1.1
+++ common/library.h 2000/04/20 06:59:59
@@ -53,7 +53,12 @@
char *ctime(), *getcwd(), *getenv(), *mktemp();
char *strcat(), *strcpy(), *strncpy(), *strpbrk(), *strchr(), *strrchr();
char *strtok();
-long lseek(), time();
+#if BSD
+off_t lseek();
+time_t time();
+#else
+long lseek();
+#endif
unsigned sleep();
void exit(), free(), qsort();
#if BSD
Index: common/vpaccess.c
===================================================================
RCS file: /cvsroot/cscope/cscope/common/vpaccess.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 vpaccess.c
--- common/vpaccess.c 2000/04/18 13:16:44 1.1.1.1
+++ common/vpaccess.c 2000/04/20 06:59:59
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <unistd.h>
#include "vp.h"
-#ifdef CCS
+#if defined(CCS) || defined(__NetBSD__)
#include <sys/types.h>
#else
typedef int mode_t;
Index: i386/Makefile
===================================================================
RCS file: /cvsroot/cscope/cscope/i386/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- i386/Makefile 2000/04/19 16:44:45 1.2
+++ i386/Makefile 2000/04/20 06:59:59
@@ -37,8 +37,8 @@
COMCS= ../common
INCLIST= -I$(COMCS)
-DEFLIST= -DLinux
-LIBS= -lncurses -lfl
+DEFLIST= -DBSD
+LIBS= -lcurses -lfl
INS= install
INSDIR=/usr/local/bin
|