summaryrefslogtreecommitdiff
path: root/open_issues/screen.mdwn
blob: cc2110adb7da159cd71d46a4d8849b846d4bcb6b (plain)
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
[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_porting]]

Revisit this issue: [[!debbug 97343]] -- special handling of `TIOCSCTTY`
depending on `__GNU__`.

---

`#ifdef linux` and friends are used in quite a number of places.

---

All diffs are GNU/Linux vs. GNU/Hurd.

     /*
      * If your system supports BSD4.4's seteuid() and setegid(), define
      * HAVE_SETEUID.
      */
    -/* #undef HAVE_SETEUID */
    +#define HAVE_SETEUID 1

TODO: check.

---

     /*
      * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special
      * device and support the ptsname(), grantpt(), unlockpt() functions.
      */
    -#define HAVE_SVR4_PTYS 1
    +/* #undef HAVE_SVR4_PTYS */
     
     /*
      * define HAVE_GETPT if you have the getpt() function.
      */
     #define HAVE_GETPT 1
     
     /*
      * define HAVE_OPENPTY if your system has the openpty() call.
      */
    -/* #undef HAVE_OPENPTY */
    +#define HAVE_OPENPTY 1
     
     /* 
      * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
      * to unusual environments. E.g. For SunOs the defaults are "qpr" and 
      * "0123456789abcdef". For SunOs 4.1.2 
      * #define PTYRANGE0 "pqrstuvwxyzPQRST" 
      * is recommended by Dan Jacobson.
      */
    -/* #undef PTYRANGE0 */
    -/* #undef PTYRANGE1 */
    +#define PTYRANGE0 "pq"
    +#define PTYRANGE1 "0123456789abcdefghijklmnopqrstuv"

TODO: check: `HAVE_SVR4_PTYS` is due to `configure.in` doing `test -c
/dev/ptmx`.  But: even if we don't have that file, we still have `ptsname`,
`grantpt`, `unlockpt`.

---

     gcc -c -I. -I.    -g -O2 -O2 -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers pty.c
    +pty.c: In function 'OpenPTY':
    +pty.c:323: warning: implicit declaration of function 'openpty'
    +pty.c: At top level:
    +pty.c:75: warning: 'PtyName' defined but not used
    +pty.c:86: warning: 'PtyProto' defined but not used
    +pty.c:87: warning: 'TtyProto' defined but not used

TODO: check.

---

    --- linux/osdef.h       2009-10-06 18:43:53.000000000 +0200
    +++ screen-4.0.3/osdef.h        2009-10-06 18:49:49.000000000 +0200
    @@ -42,13 +42,19 @@
     #endif
     
     #ifdef SYSV
    +extern char *strchr __P((char *, int));
    +extern char *strrchr __P((char *, int));
    +extern char *memset __P((char *, int, int));
    +extern int   memcmp __P((char *, char *, int));
     #else
     #endif
     
     #ifndef USEBCOPY
     # ifdef USEMEMCPY
    +extern void  memcpy __P((char *, char *, int));
     # else
     #  ifdef USEMEMMOVE
    +extern void  memmove __P((char *, char *, int));
     #  else
     #  endif
     # endif

TODO: check.