diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2011-04-25 13:37:00 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:45:18 +0200 |
commit | 75a4a592e5ccda30715f93563d741b83e0dcf39e (patch) | |
tree | 502f745607e77a2c4386ad38d818ddcafe81489c /source/xap/xxgdb/xxgdb-1.12-debian-pty.patch | |
parent | b76270bf9e6dd375e495fec92140a79a79415d27 (diff) | |
download | current-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz |
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011
Slackware 13.37 x86_64 stable is released!
Thanks to everyone who pitched in on this release: the Slackware team,
the folks producing upstream code, and linuxquestions.org for providing
a great forum for collaboration and testing.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
As always, thanks to the Slackware community for testing, suggestions,
and feedback. :-)
Have fun!
Diffstat (limited to 'source/xap/xxgdb/xxgdb-1.12-debian-pty.patch')
-rw-r--r-- | source/xap/xxgdb/xxgdb-1.12-debian-pty.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/source/xap/xxgdb/xxgdb-1.12-debian-pty.patch b/source/xap/xxgdb/xxgdb-1.12-debian-pty.patch new file mode 100644 index 00000000..7a56971f --- /dev/null +++ b/source/xap/xxgdb/xxgdb-1.12-debian-pty.patch @@ -0,0 +1,76 @@ +diff -urNad xxgdb-1.12~/calldbx.c xxgdb-1.12/calldbx.c +--- xxgdb-1.12~/calldbx.c 1996-10-02 10:59:45.000000000 +0200 ++++ xxgdb-1.12/calldbx.c 2008-05-16 17:44:05.000000000 +0200 +@@ -85,8 +85,10 @@ + #include <sys/un.h> + #endif /* CREATE_IO_WINDOW */ + +-#ifdef SVR4 ++#if defined(SVR4) || defined(UNIX98) + #define MASTER_CLONE "/dev/ptmx" ++#endif ++#ifdef SVR4 + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/stropts.h> +@@ -125,13 +127,14 @@ + { + int master; + +-#ifdef SVR4 /* (MJH) Use STREAMS */ ++#if defined(SVR4) || defined(UNIX98) + + if((master = open(MASTER_CLONE, O_RDWR)) < 0) + perror(MASTER_CLONE); + else + return master; +-#else ++#endif ++#if !defined(SVR4) && !defined(UNIX98) + int i; + char c; + +@@ -150,7 +153,7 @@ + #ifndef sco + } + #endif +-#endif /* SVR4 */ ++#endif /* !defined(SVR4) && !defined(UNIX98) */ + + #ifdef GDB + fprintf(stderr, "xxgdb: all ptys in use\n"); +@@ -166,6 +169,25 @@ + { + int slave; + ++#if defined(UNIX98) ++ ++ int n; ++ int zero=0; ++ char ptsname[16]; ++ ++ if (ioctl(master, TIOCGPTN, &n) < 0) ++ exit(2); ++ snprintf(ptsname,sizeof(ptsname),"/dev/pts/%i", n); ++ if (ioctl(master, TIOCSPTLCK, &zero) < 0) ++ exit(3); ++ if ((slave = open(ptsname, O_RDWR)) < 0) { ++ perror(ptsname); ++ exit(4); ++ } ++ return slave; ++ ++#else ++ + #ifdef SVR4 /* (MJH) */ + char *slave_name = "unknown"; + extern char *ptsname(int master); +@@ -193,6 +215,8 @@ + } + return slave; + #endif /* SVR4 */ ++ ++#endif /* UNIX98 */ + } + + #ifdef CREATE_IO_WINDOW |