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
|
$NetBSD: patch-ai,v 1.1 1999/09/29 00:41:52 christos Exp $
*** icb/serverlist.c.orig Tue Sep 28 19:14:47 1999
--- icb/serverlist.c Tue Sep 28 19:15:09 1999
***************
*** 23,29 ****
#ifdef sgi
#undef SYSV
#endif
! #if !defined(SYSV) && !(defined(BSD) && BSD >= 199306)
getwd(pwd);
#else /* SYSV */
getcwd(pwd, MAXPATHLEN+1);
--- 23,29 ----
#ifdef sgi
#undef SYSV
#endif
! #if !defined(SYSV) && !(defined(BSD) && BSD >= 199306) && !defined(__linux__)
getwd(pwd);
#else /* SYSV */
getcwd(pwd, MAXPATHLEN+1);
*** icb/unix.c.orig Tue Sep 28 19:14:47 1999
--- icb/unix.c Tue Sep 28 19:15:42 1999
***************
*** 4,9 ****
--- 4,11 ----
/* This file contains routines that are unix dependent. */
/* Eventually, most unixisms should be moved here. */
+ #include <sys/types.h>
+ #include <sys/param.h>
#include <stdio.h>
#include "icb.h"
#include "externs.h"
***************
*** 13,18 ****
--- 15,28 ----
#undef stty
#undef gtty
+ #if defined(__linux__)
+ #include <termios.h>
+ #include <sys/ioctl.h>
+ #define TTYSTRUCT termios
+ #define stty(fd,buf) tcgetattr((fd), (buf))
+ #define gtty(fd,buf) tcsetattr((fd), TCSANOW, (buf))
+ #define SYSV
+ #else
#ifndef SYSV
#ifdef linux
***************
*** 30,35 ****
--- 40,46 ----
#define stty(fd,buf) ioctl((fd),TCSETA,(buf))
#define gtty(fd,buf) ioctl((fd),TCGETA,(buf))
#endif /* SYSV */
+ #endif /* __linux__ */
char *getlogin();
***************
*** 183,189 ****
getwinsize()
{
! #ifndef NOWINSIZE
struct winsize win;
/* get tty settings */
--- 194,200 ----
getwinsize()
{
! #ifdef TIOCGWINSZ
struct winsize win;
/* get tty settings */
|