gnome-libs/zvt vs. Solaris 2.5.1: patch



For the past few days, gnome-libs has included rather incomplete and non-compileable pty code.  The following patch makes it compile, although whether it *works* is another question (I'm still trying to get things to compile again...).

Index: gnome-libs/configure.in
===================================================================
RCS file: /cvs/gnome/gnome-libs/configure.in,v
retrieving revision 1.115
diff -u -r1.115 configure.in
--- configure.in	1998/11/05 01:15:25	1.115
+++ configure.in	1998/11/06 20:27:17
@@ -93,7 +93,7 @@
 dnl
 dnl zvt checks
 dnl
-AC_CHECK_HEADERS(sys/select.h)
+AC_CHECK_HEADERS(sys/select.h paths.h)
 
 dnl
 dnl gnome-pty-support checks
Index: gnome-libs/zvt/gnome-login-support.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/zvt/gnome-login-support.c,v
retrieving revision 1.2
diff -u -r1.2 gnome-login-support.c
--- gnome-login-support.c	1998/11/05 01:05:54	1.2
+++ gnome-login-support.c	1998/11/06 20:27:18
@@ -20,6 +20,9 @@
 #include <grp.h>
 #include <sys/types.h>
 #include "gnome-login-support.h"
+#ifdef HAVE_GRANTPT
+#include <stropts.h>
+#endif
 
 /*
  * HAVE_OPENPTY => HAVE_FORKPTY
@@ -145,6 +148,7 @@
 static int
 pty_open_master (char *pty_name, int *used_bsd)
 {
+	char *slave_name;
 	int pty_master;
 	
 	strcpy (pty_name, "/dev/ptmx");
@@ -158,7 +162,7 @@
 	 */
 	if (pty_master == -1){
 		*used_bsd = 1;
-		return pty_open_master_bsd (pty_name);
+		return pty_open_master_bsd (pty_name, used_bsd);
 	}
 	*used_bsd = 0;
 
Index: gnome-libs/zvt/gnome-pty-helper.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/zvt/gnome-pty-helper.c,v
retrieving revision 1.2
diff -u -r1.2 gnome-pty-helper.c
--- gnome-pty-helper.c	1998/11/05 01:05:55	1.2
+++ gnome-pty-helper.c	1998/11/06 20:27:18
@@ -93,6 +93,12 @@
 }
 #else
 #include <stropts.h>
+static int
+init_msg_pass ()
+{
+	/* nothing */
+}
+
 int
 pass_fd (int client_fd, int fd)
 {
Index: gnome-libs/zvt/gnome-utmp.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/zvt/gnome-utmp.c,v
retrieving revision 1.1
diff -u -r1.1 gnome-utmp.c
--- gnome-utmp.c	1998/11/05 01:05:57	1.1
+++ gnome-utmp.c	1998/11/06 20:27:18
@@ -16,13 +16,23 @@
 #include <errno.h>
 #include "gnome-pty.h"
 
+#ifdef HAVE_PATHS_H
 #include <paths.h>
+#endif
 #ifdef HAVE_UTMPX_H
 #    include <utmpx.h>
 #    define USE_SYSV_UTMP
 #else
 #    ifdef HAVE_SETUTENT
 #        define USE_SYSV_UTMP
+#    endif
+#endif
+
+#ifndef UTMP_FILENAME
+#    ifdef UTMP_FILE
+#        define UTMP_FILENAME UTMP_FILE
+#    else
+#        define UTMP_FILENAME "/etc/utmp"
 #    endif
 #endif
 
Index: gnome-libs/zvt/subshell.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/zvt/subshell.c,v
retrieving revision 1.7
diff -u -r1.7 subshell.c
--- subshell.c	1998/11/05 01:05:57	1.7
+++ subshell.c	1998/11/06 20:27:18
@@ -119,11 +119,11 @@
 	return *(int *) CMSG_DATA (cmptr);
 }
 #else
-static mint
+static int
 receive_fd (int helper_fd)
 {
 	int flag;
-	struct buf [128];
+	char buf [128];
 	struct strbuf dat;
 	struct strrecvfd recvfd;
 	
@@ -137,7 +137,7 @@
 	if (dat.len == 0)
 		return -1;
 
-	if (ioctl (helper_fd, I_RECVFD, &fd) < 0)
+	if (ioctl (helper_fd, I_RECVFD, &recvfd) < 0)
 		return -1;
 
 	return recvfd.fd;

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering
carnegie mellon university			   (bsa@kf8nh is still valid.)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]