summaryrefslogtreecommitdiff
path: root/sysutils/gnome-vfs/patches/patch-ar
blob: 7d34f19ba7b2eb93f52363114973548d868f6c6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$NetBSD: patch-ar,v 1.1 2007/09/19 22:22:40 wiz Exp $

--- libgnomevfs/gnome-vfs-pty.c.orig	Tue Nov 22 15:10:17 2005
+++ libgnomevfs/gnome-vfs-pty.c	Wed Apr 26 23:15:08 2006
@@ -306,7 +306,7 @@ _gnome_vfs_pty_run_on_pty(int fd, gboole
 		chdir(directory);
 	}
 
-#ifdef HAVE_UTMP_H
+#ifdef HAVE_LOGIN_TTY
 	/* This sets stdin, stdout, stderr to the socket */	
 	if (login && login_tty (fd) == -1) {
 		g_printerr ("mount child process login_tty failed: %s\n", strerror (errno));
@@ -629,6 +629,7 @@ _gnome_vfs_pty_set_size(int master, int 
 static char *
 _gnome_vfs_pty_ptsname(int master)
 {
+#ifndef __APPLE__
 #if defined(HAVE_PTSNAME_R)
 	gsize len = 1024;
 	char *buf = NULL;
@@ -674,6 +675,7 @@ _gnome_vfs_pty_ptsname(int master)
 		return g_strdup_printf("/dev/pts/%d", pty);
 	}
 #endif
+#endif /* __APPLE__ */
 	return NULL;
 }
 
@@ -681,10 +683,10 @@ static int
 _gnome_vfs_pty_getpt(void)
 {
 	int fd, flags;
-#ifdef HAVE_GETPT
+#if defined(HAVE_GETPT) && !defined(__APPLE__)
 	/* Call the system's function for allocating a pty. */
 	fd = getpt();
-#elif defined(HAVE_POSIX_OPENPT)
+#elif defined(HAVE_POSIX_OPENPT) && !defined(__APPLE__)
 	fd = posix_openpt(O_RDWR | O_NOCTTY);
 #else
 	/* Try to allocate a pty by accessing the pty master multiplex. */
@@ -703,7 +705,7 @@ _gnome_vfs_pty_getpt(void)
 static int
 _gnome_vfs_pty_grantpt(int master)
 {
-#ifdef HAVE_GRANTPT
+#if defined(HAVE_GRANTPT) && !defined(__APPLE__)
 	return grantpt(master);
 #else
 	return 0;
@@ -713,6 +715,9 @@ _gnome_vfs_pty_grantpt(int master)
 static int
 _gnome_vfs_pty_unlockpt(int fd)
 {
+#ifdef __APPLE__
+	return -1;
+#else
 #ifdef HAVE_UNLOCKPT
 	return unlockpt(fd);
 #elif defined(TIOCSPTLCK)
@@ -720,6 +725,7 @@ _gnome_vfs_pty_unlockpt(int fd)
 	return ioctl(fd, TIOCSPTLCK, &zero);
 #else
 	return -1;
+#endif
 #endif
 }