aboutsummaryrefslogtreecommitdiffstats
path: root/src/s
diff options
context:
space:
mode:
authorSteven Tamm <[email protected]>2005-01-20 18:13:48 +0000
committerSteven Tamm <[email protected]>2005-01-20 18:13:48 +0000
commita15252fdfb18b102d25c3c90e866036073a1c3de (patch)
tree4526fc8bbd1572becbf0ce4b595380353ddd31a5 /src/s
parentb059de99a9a3ad624d9652287ca24826609e0f37 (diff)
* editfns.c (Voperating_system_release): Added.
(init_editfns): Assign new variable operating-system-release based on call to uname if available. (get_operating_system_release): Added function to allow c-level access to operating system release. * config.h: Regenerated. * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or less. (MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for using ptys as '7'. * term/mac-win.el (process-connection-type): Removed. Controlled now by s/darwin.h:PTY_ITERATION.
Diffstat (limited to 'src/s')
-rw-r--r--src/s/darwin.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 9f78405a43..d8da3e3174 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -107,6 +107,22 @@ Boston, MA 02111-1307, USA. */
#define HAVE_PTYS
+
+/*
+ * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION
+ * Test the operating system release and only allow PTYs if it is greater
+ * than 7.
+ */
+#define MIN_PTY_KERNEL_VERSION '7'
+#define PTY_ITERATION \
+ char *release = get_operating_system_release(); \
+ if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \
+ && release[1] == '.')) \
+ return -1; \
+ for (c = FIRST_PTY_LETTER; c <= 'z'; c++) \
+ for (i = 0; i < 16; i++)
+
+
/*
* Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
* The 4.2 opendir, etc., library functions.