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

Comparing libptytty/src/ptytty.C (file contents):
Revision 1.32 by ayin, Mon Nov 26 10:41:10 2007 UTC vs.
Revision 1.34 by ayin, Fri Dec 14 09:51:32 2007 UTC

32#include <cstdlib> 32#include <cstdlib>
33#include <cstring> 33#include <cstring>
34#include <csignal> 34#include <csignal>
35 35
36#include <sys/types.h> 36#include <sys/types.h>
37#include <sys/stat.h>
37#include <unistd.h> 38#include <unistd.h>
38#include <fcntl.h> 39#include <fcntl.h>
39 40
40#ifdef HAVE_SYS_IOCTL_H 41#ifdef HAVE_SYS_IOCTL_H
41# include <sys/ioctl.h> 42# include <sys/ioctl.h>
127 int pfd; 128 int pfd;
128 char *slave; 129 char *slave;
129 130
130 slave = _getpty (&pfd, O_RDWR | O_NONBLOCK | O_NOCTTY, 0622, 0); 131 slave = _getpty (&pfd, O_RDWR | O_NONBLOCK | O_NOCTTY, 0622, 0);
131 132
132 if (slave != NULL) { 133 if (slave != NULL)
134 {
133 *ttydev = strdup (slave); 135 *ttydev = strdup (slave);
134 return pfd; 136 return pfd;
135 } 137 }
136 138
137 return -1; 139 return -1;
138 } 140 }
139 141
140#elif defined(HAVE_DEV_PTC) 142#elif defined(HAVE_DEV_PTC)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines