ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/ptytty.C
(Generate patch)

Comparing rxvt-unicode/src/ptytty.C (file contents):
Revision 1.33 by root, Wed Jan 11 23:08:54 2006 UTC vs.
Revision 1.34 by ayin, Tue Jan 17 08:54:33 2006 UTC

88 if (*ttydev != NULL) 88 if (*ttydev != NULL)
89 return pfd; 89 return pfd;
90#endif 90#endif
91 91
92#if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT) 92#if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)
93# if defined(PTYS_ARE_POSIX) || defined(PTYS_ARE_PTMX) 93# if defined(PTYS_ARE_GETPT) || defined(PTYS_ARE_POSIX) || defined(PTYS_ARE_PTMX)
94 94
95 { 95 {
96# ifdef PTYS_ARE_GETPT
97 pfd = getpt();
98# else
96# ifdef PTYS_ARE_POSIX 99# ifdef PTYS_ARE_POSIX
97 pfd = posix_openpt (O_RDWR); 100 pfd = posix_openpt (O_RDWR);
98# else 101# else
99 pfd = open ("/dev/ptmx", O_RDWR | O_NOCTTY, 0); 102 pfd = open ("/dev/ptmx", O_RDWR | O_NOCTTY, 0);
103# endif
100# endif 104# endif
101 105
102 if (pfd >= 0) 106 if (pfd >= 0)
103 { 107 {
104 if (grantpt (pfd) == 0 /* change slave permissions */ 108 if (grantpt (pfd) == 0 /* change slave permissions */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines