Mercurial > emacs
changeset 59658:45074d913d23
* 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.
author | Steven Tamm <steventamm@mac.com> |
---|---|
date | Thu, 20 Jan 2005 18:13:48 +0000 |
parents | f3aa25eacdb3 |
children | 030542bf12bf |
files | lisp/ChangeLog lisp/term/mac-win.el src/ChangeLog src/editfns.c src/s/darwin.h |
diffstat | 5 files changed, 48 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jan 20 15:37:41 2005 +0000 +++ b/lisp/ChangeLog Thu Jan 20 18:13:48 2005 +0000 @@ -1,3 +1,8 @@ +2005-01-20 Steven Tamm <steventamm@mac.com> + + * term/mac-win.el (process-connection-type): Removed. + Controlled now by s/darwin.h:PTY_ITERATION. + 2005-01-20 Stefan Monnier <monnier@iro.umontreal.ca> * window.el (handle-select-window): Don't switch window when we're
--- a/lisp/term/mac-win.el Thu Jan 20 15:37:41 2005 +0000 +++ b/lisp/term/mac-win.el Thu Jan 20 18:13:48 2005 +0000 @@ -1694,11 +1694,9 @@ (if (string= default-directory "/") (cd "~")) -;; Tell Emacs to use pipes instead of pty's for processes because the -;; latter sometimes lose characters. Pty support is compiled in since -;; ange-ftp will not work without it. Fixed with darwin 7 (OS X 10.3). -(setq process-connection-type - (not (string-match "^[0-6]\\." operating-system-release))) +;; Darwin 6- pty breakage is now controlled from the C code so that +;; it applies to all builds on darwin. See s/darwin.h PTY_ITERATION. +;; (setq process-connection-type t) ;; Assume that fonts are always scalable on the Mac. This sometimes ;; results in characters with jagged edges. However, without it,
--- a/src/ChangeLog Thu Jan 20 15:37:41 2005 +0000 +++ b/src/ChangeLog Thu Jan 20 18:13:48 2005 +0000 @@ -1,3 +1,18 @@ +2005-01-20 Steven Tamm <steventamm@mac.com> + + * 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'. + 2005-01-20 Kim F. Storm <storm@cua.dk> * alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean.
--- a/src/editfns.c Thu Jan 20 15:37:41 2005 +0000 +++ b/src/editfns.c Thu Jan 20 18:13:48 2005 +0000 @@ -1364,6 +1364,15 @@ return ""; } +char * +get_operating_system_release() +{ + if (STRINGP (Voperating_system_release)) + return (char *) SDATA (Voperating_system_release); + else + return ""; +} + DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, doc: /* Return the process ID of Emacs, as an integer. */) ()
--- a/src/s/darwin.h Thu Jan 20 15:37:41 2005 +0000 +++ b/src/s/darwin.h Thu Jan 20 18:13:48 2005 +0000 @@ -107,6 +107,22 @@ #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.