aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Tamm2005-01-20 18:13:48 +0000
committerSteven Tamm2005-01-20 18:13:48 +0000
commita15252fdfb18b102d25c3c90e866036073a1c3de (patch)
tree4526fc8bbd1572becbf0ce4b595380353ddd31a5 /src
parentb059de99a9a3ad624d9652287ca24826609e0f37 (diff)
downloademacs-a15252fdfb18b102d25c3c90e866036073a1c3de.tar.gz
emacs-a15252fdfb18b102d25c3c90e866036073a1c3de.zip
* 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')
-rw-r--r--src/ChangeLog15
-rw-r--r--src/editfns.c9
-rw-r--r--src/s/darwin.h16
3 files changed, 40 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d69409965f1..4b33af4bc4a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
12005-01-20 Steven Tamm <steventamm@mac.com>
2
3 * editfns.c (Voperating_system_release): Added.
4 (init_editfns): Assign new variable operating-system-release
5 based on call to uname if available.
6 (get_operating_system_release): Added function to
7 allow c-level access to operating system release.
8
9 * config.h: Regenerated.
10
11 * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or
12 less.
13 (MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for
14 using ptys as '7'.
15
12005-01-20 Kim F. Storm <storm@cua.dk> 162005-01-20 Kim F. Storm <storm@cua.dk>
2 17
3 * alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean. 18 * alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean.
diff --git a/src/editfns.c b/src/editfns.c
index 6641c990a4f..a6cd2c0e16b 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1364,6 +1364,15 @@ get_system_name ()
1364 return ""; 1364 return "";
1365} 1365}
1366 1366
1367char *
1368get_operating_system_release()
1369{
1370 if (STRINGP (Voperating_system_release))
1371 return (char *) SDATA (Voperating_system_release);
1372 else
1373 return "";
1374}
1375
1367DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, 1376DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,
1368 doc: /* Return the process ID of Emacs, as an integer. */) 1377 doc: /* Return the process ID of Emacs, as an integer. */)
1369 () 1378 ()
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 9f78405a43c..d8da3e3174c 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -107,6 +107,22 @@ Boston, MA 02111-1307, USA. */
107 107
108#define HAVE_PTYS 108#define HAVE_PTYS
109 109
110
111/*
112 * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION
113 * Test the operating system release and only allow PTYs if it is greater
114 * than 7.
115 */
116#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
110/* 126/*
111 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate 127 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
112 * The 4.2 opendir, etc., library functions. 128 * The 4.2 opendir, etc., library functions.