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-unix98ptys/lib/libxview/ttysw/tty_init.c (-17 lines)
Lines 27-36 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
34
#include <xview_private/portable.h>	/* for XV* defines and termios */
30
#include <xview_private/portable.h>	/* for XV* defines and termios */
35
31
36
#ifdef	XV_USE_SVR4_PTYS
32
#ifdef	XV_USE_SVR4_PTYS
Lines 735-752 Link Here
735
    int		    tmpfd;
731
    int		    tmpfd;
736
    int		    pty = 0, tty = 0;
732
    int		    pty = 0, tty = 0;
737
    int             on = 1;
733
    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
750
#ifdef __CYGWIN__
734
#ifdef __CYGWIN__
751
    openpty(&pty, &tty, ttysw->tty_name, NULL, NULL);
735
    openpty(&pty, &tty, ttysw->tty_name, NULL, NULL);
752
#else
736
#else
Lines 965-971 Link Here
965
 
949
 
966
#endif /* SVR4 */
950
#endif /* SVR4 */
967
#endif /* cygwin */
951
#endif /* cygwin */
968
#endif /* _XOPEN_SOURCE */
969
952
970
    if (ttysw_restoreparms(tty))
953
    if (ttysw_restoreparms(tty))
971
	(void) putenv(WE_TTYPARMS_E);
954
	(void) putenv(WE_TTYPARMS_E);

Return to bug 88334