Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 88334 | Differences between
and this patch

Collapse All | Expand All

(-)xview-3.2p1.4-18c/lib/libxview/ttysw/tty_init.c (+17 lines)
Lines 27-32 Link Here
27
#include <pty.h>
27
#include <pty.h>
28
#endif
28
#endif
29
29
30
#ifdef _XOPEN_SOURCE
31
#include <stdlib.h>
32
#endif
33
30
#include <xview_private/portable.h>	/* for XV* defines and termios */
34
#include <xview_private/portable.h>	/* for XV* defines and termios */
31
35
32
#ifdef	XV_USE_SVR4_PTYS
36
#ifdef	XV_USE_SVR4_PTYS
Lines 731-736 Link Here
731
    int		    tmpfd;
735
    int		    tmpfd;
732
    int		    pty = 0, tty = 0;
736
    int		    pty = 0, tty = 0;
733
    int             on = 1;
737
    int             on = 1;
738
739
#ifdef _XOPEN_SOURCE
740
    /* info: pty master, tty slave, Ttysw->tty_name is char[20] */
741
    if (((pty=getpt())<0)||(grantpt(pty)<0)||(unlockpt(pty)<0)) {
742
        (void) fprintf(stderr, XV_MSG("Error: getpt/grantpt/unlockpt failed\n"));
743
        return XV_ERROR; }
744
    if ((ptsname(pty)==NULL)||(strncpy(ttysw->tty_name,ptsname(pty),19)==NULL)) {
745
        (void) fprintf(stderr, XV_MSG("Error: ptsname/strncpy failed\n"));
746
	return XV_ERROR; } 
747
    if ((tty=open(ttysw->tty_name,O_RDWR))<0) {
748
        return XV_ERROR; }
749
#else
734
#ifdef __CYGWIN__
750
#ifdef __CYGWIN__
735
    openpty(&pty, &tty, ttysw->tty_name, NULL, NULL);
751
    openpty(&pty, &tty, ttysw->tty_name, NULL, NULL);
736
#else
752
#else
Lines 949-954 Link Here
949
 
965
 
950
#endif /* SVR4 */
966
#endif /* SVR4 */
951
#endif /* cygwin */
967
#endif /* cygwin */
968
#endif /* _XOPEN_SOURCE */
952
969
953
    if (ttysw_restoreparms(tty))
970
    if (ttysw_restoreparms(tty))
954
	(void) putenv(WE_TTYPARMS_E);
971
	(void) putenv(WE_TTYPARMS_E);

Return to bug 88334