aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Tamm2005-01-22 15:54:04 +0000
committerSteven Tamm2005-01-22 15:54:04 +0000
commitd9e7c622607bc74214ad5f9aa0eaa64d7a4eba55 (patch)
treea0d4b82e7cdc64801379e5ae3431b9eff6785e73 /src
parent3d4d788a38060b1bb2435a57876d4065eb005b5b (diff)
downloademacs-d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55.tar.gz
emacs-d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55.zip
* s/darwin.h: Removed PTY_ITERATION from here.
(DARWIN): Defined. * process.c (init_process): Default process-connection-type to nil on darwin 6 or less, t if it is 7 or higher. This way the broken pty behavior is still allowed on darwin 6 for interactive processes for people that know what they are doing.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/process.c14
-rw-r--r--src/s/darwin.h22
3 files changed, 32 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 00f8e15aff2..8cf79218c3e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12005-01-22 Steven Tamm <steventamm@mac.com>
2
3 * s/darwin.h: Removed PTY_ITERATION from here.
4 (DARWIN): Defined.
5 * process.c (init_process): Default process-connection-type to
6 nil on darwin 6 or less, t if it is 7 or higher. This way the
7 broken pty behavior is still allowed on darwin 6 for interactive
8 processes for people that know what they are doing.
9
12005-01-22 Kim F. Storm <storm@cua.dk> 102005-01-22 Kim F. Storm <storm@cua.dk>
2 11
3 * window.c (auto_window_vscroll_p): New boolean. 12 * window.c (auto_window_vscroll_p): New boolean.
diff --git a/src/process.c b/src/process.c
index 6134d3131bc..9b8b086ec7e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -187,6 +187,7 @@ extern Lisp_Object QCfilter;
187#include "syswait.h" 187#include "syswait.h"
188 188
189extern void set_waiting_for_input P_ ((EMACS_TIME *)); 189extern void set_waiting_for_input P_ ((EMACS_TIME *));
190extern char *get_operating_system_release ();
190 191
191#ifndef USE_CRT_DLL 192#ifndef USE_CRT_DLL
192extern int errno; 193extern int errno;
@@ -6704,6 +6705,19 @@ init_process ()
6704 Fprovide (intern ("make-network-process"), subfeatures); 6705 Fprovide (intern ("make-network-process"), subfeatures);
6705 } 6706 }
6706#endif /* HAVE_SOCKETS */ 6707#endif /* HAVE_SOCKETS */
6708
6709#ifdef DARWIN
6710 /* PTYs are broken on Darwin < 6, but are sometimes useful for interactive
6711 processes. As such, we only change the default value. */
6712 if (initialized)
6713 {
6714 char *release = get_operating_system_release();
6715 if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION
6716 && release[1] == '.')) {
6717 Vprocess_connection_type = Qnil;
6718 }
6719 }
6720#endif
6707} 6721}
6708 6722
6709void 6723void
diff --git a/src/s/darwin.h b/src/s/darwin.h
index d8da3e3174c..5b162ea08a3 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -37,6 +37,10 @@ Boston, MA 02111-1307, USA. */
37#define BSD_SYSTEM 37#define BSD_SYSTEM
38/* #define VMS */ 38/* #define VMS */
39 39
40#ifndef DARWIN
41#define DARWIN 1
42#endif
43
40/* MAC_OS is used to conditionally compile code common to both MAC_OS8 44/* MAC_OS is used to conditionally compile code common to both MAC_OS8
41 and MAC_OSX. */ 45 and MAC_OSX. */
42#ifdef MAC_OSX 46#ifdef MAC_OSX
@@ -103,25 +107,17 @@ Boston, MA 02111-1307, USA. */
103 107
104/* 108/*
105 * Define HAVE_PTYS if the system supports pty devices. 109 * Define HAVE_PTYS if the system supports pty devices.
110 * Note: PTYs are broken on darwin <6. Use at your own risk.
106 */ 111 */
107 112
108#define HAVE_PTYS 113#define HAVE_PTYS
109 114
110 115/**
111/* 116 * PTYs only work correctly on Darwin 7 or higher. So make the
112 * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION 117 * default for process-connection-type dependent on the kernel
113 * Test the operating system release and only allow PTYs if it is greater 118 * version.
114 * than 7.
115 */ 119 */
116#define MIN_PTY_KERNEL_VERSION '7' 120#define MIN_PTY_KERNEL_VERSION '7'
117#define PTY_ITERATION \
118 char *release = get_operating_system_release(); \
119 if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \
120 && release[1] == '.')) \
121 return -1; \
122 for (c = FIRST_PTY_LETTER; c <= 'z'; c++) \
123 for (i = 0; i < 16; i++)
124
125 121
126/* 122/*
127 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate 123 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate