* subshell.c (pty_open_master) [HAVE_GRANTPT]: Prefer

posix_openpt() over GNU-specific getpt().  Needed for FreeBSD
5.x.  Original patch by Max Khon <fjoe@FreeBSD.org>
This commit is contained in:
Pavel Roskin 2003-07-21 23:33:34 +00:00
parent ff144aca4d
commit 17a04526cf
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2003-07-21 Pavel Roskin <proski@gnu.org>
* subshell.c (pty_open_master) [HAVE_GRANTPT]: Prefer
posix_openpt() over GNU-specific getpt(). Needed for FreeBSD
5.x. Original patch by Max Khon <fjoe@FreeBSD.org>
* screen.c (panel_key): Redisplay ministatus if the searching
was turned off. Reported by gotar@poczta.onet.pl

View File

@ -1023,8 +1023,9 @@ static int pty_open_master (char *pty_name)
char *slave_name;
int pty_master;
#ifdef HAVE_GETPT
#ifdef HAVE_POSIX_OPENPT
pty_master = posix_openpt(O_RDWR);
#elif HAVE_GETPT
/* getpt () is a GNU extension (glibc 2.1.x) */
pty_master = getpt ();
#elif IS_AIX
@ -1034,6 +1035,7 @@ static int pty_open_master (char *pty_name)
strcpy (pty_name, "/dev/ptmx");
pty_master = open (pty_name, O_RDWR);
#endif
if (pty_master == -1)
return -1;