mirror of
git://slackware.nl/current.git
synced 2025-01-14 08:01:11 +01:00
75a4a592e5
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!
76 lines
1.5 KiB
Diff
76 lines
1.5 KiB
Diff
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
|