]> code.delx.au - gnu-emacs/commitdiff
* editfns.c (Voperating_system_release): Added.
authorSteven Tamm <steventamm@mac.com>
Thu, 20 Jan 2005 18:13:48 +0000 (18:13 +0000)
committerSteven Tamm <steventamm@mac.com>
Thu, 20 Jan 2005 18:13:48 +0000 (18:13 +0000)
(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.

lisp/ChangeLog
lisp/term/mac-win.el
src/ChangeLog
src/editfns.c
src/s/darwin.h

index 5abd6512e46aebc6e85c41cd773dd52fdd760e62..6db1db5f854feada0826b434de1e0fc49353d01d 100644 (file)
@@ -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
index 519e8a5f07635f75bcabc4614efff86b67c4ffb9..a7ded41103e634654f9de18cf7b3185efeb29a0e 100644 (file)
@@ -1694,11 +1694,9 @@ Switch to a buffer editing the last file dropped."
 (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,
index d69409965f10f23947e0ca2042fc967d1bc26271..4b33af4bc4af41c974b4be927f194497b2df7655 100644 (file)
@@ -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.
index 6641c990a4fdc54a4cf4211fe7dae07476f0dd9e..a6cd2c0e16b44c44b162e4be778b63290e574603 100644 (file)
@@ -1364,6 +1364,15 @@ get_system_name ()
     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.  */)
      ()
index 9f78405a43c85e473fba834e7bbd932e4ae941cb..d8da3e3174c60eb7032267697c5c6d206606b01b 100644 (file)
@@ -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.