* subshell.c (pty_open_master) [HAVE_SCO]: Fix ambigous `else'.
[!HAVE_SCO && !HAVE_GRANTPT]: Likewise.
Этот коммит содержится в:
родитель
d21f09608b
Коммит
85e2dac3be
@ -1,3 +1,8 @@
|
|||||||
|
2001-05-17 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* subshell.c (pty_open_master) [HAVE_SCO]: Fix ambigous `else'.
|
||||||
|
[!HAVE_SCO && !HAVE_GRANTPT]: Likewise.
|
||||||
|
|
||||||
2001-05-16 Pavel Roskin <proski@gnu.org>
|
2001-05-16 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* subshell.c: Define _GNU_SOURCE to enable prototypes for
|
* subshell.c: Define _GNU_SOURCE to enable prototypes for
|
||||||
|
@ -1102,11 +1102,12 @@ static int pty_open_master (char *pty_name)
|
|||||||
{
|
{
|
||||||
g_snprintf(ptr, 9, "%d",num); /* surpriiise ... SCO lacks itoa() */
|
g_snprintf(ptr, 9, "%d",num); /* surpriiise ... SCO lacks itoa() */
|
||||||
/* Try to open master */
|
/* Try to open master */
|
||||||
if ((pty_master = open (pty_name, O_RDWR)) == -1)
|
if ((pty_master = open (pty_name, O_RDWR)) == -1) {
|
||||||
if (errno == ENOENT) /* Different from EIO */
|
if (errno == ENOENT) /* Different from EIO */
|
||||||
return -1; /* Out of pty devices */
|
return -1; /* Out of pty devices */
|
||||||
else
|
else
|
||||||
continue; /* Try next pty device */
|
continue; /* Try next pty device */
|
||||||
|
}
|
||||||
pty_name [5] = 't'; /* Change "pty" to "tty" */
|
pty_name [5] = 't'; /* Change "pty" to "tty" */
|
||||||
if (access (pty_name, 6)){
|
if (access (pty_name, 6)){
|
||||||
close (pty_master);
|
close (pty_master);
|
||||||
@ -1140,7 +1141,7 @@ static int pty_open_slave (const char *pty_name)
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#elif HAVE_GRANTPT
|
#elif HAVE_GRANTPT /* !HAVE_SCO */
|
||||||
|
|
||||||
/* {{{ System V version of pty_open_master */
|
/* {{{ System V version of pty_open_master */
|
||||||
|
|
||||||
@ -1217,7 +1218,7 @@ static int pty_open_slave (const char *pty_name)
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#else
|
#else /* !HAVE_SCO && !HAVE_GRANTPT */
|
||||||
|
|
||||||
/* {{{ BSD version of pty_open_master */
|
/* {{{ BSD version of pty_open_master */
|
||||||
|
|
||||||
@ -1235,11 +1236,12 @@ static int pty_open_master (char *pty_name)
|
|||||||
pty_name [9] = *ptr2;
|
pty_name [9] = *ptr2;
|
||||||
|
|
||||||
/* Try to open master */
|
/* Try to open master */
|
||||||
if ((pty_master = open (pty_name, O_RDWR)) == -1)
|
if ((pty_master = open (pty_name, O_RDWR)) == -1) {
|
||||||
if (errno == ENOENT) /* Different from EIO */
|
if (errno == ENOENT) /* Different from EIO */
|
||||||
return -1; /* Out of pty devices */
|
return -1; /* Out of pty devices */
|
||||||
else
|
else
|
||||||
continue; /* Try next pty device */
|
continue; /* Try next pty device */
|
||||||
|
}
|
||||||
pty_name [5] = 't'; /* Change "pty" to "tty" */
|
pty_name [5] = 't'; /* Change "pty" to "tty" */
|
||||||
if (access (pty_name, 6)){
|
if (access (pty_name, 6)){
|
||||||
close (pty_master);
|
close (pty_master);
|
||||||
@ -1274,7 +1276,7 @@ static int pty_open_slave (const char *pty_name)
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#endif
|
#endif /* !HAVE_SCO && !HAVE_GRANTPT */
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user