diff options
author | Steven Tamm <steventamm@mac.com> | 2005-01-20 18:13:48 +0000 |
---|---|---|
committer | Steven Tamm <steventamm@mac.com> | 2005-01-20 18:13:48 +0000 |
commit | e61b85336519a21c984490d16345c6aa1ed519c2 (patch) | |
tree | b15341e414001686c42a42c2f8c9be75ac0c98a1 /src/s | |
parent | b9ed0bcc4c29df928573d83d3267ace509fbbf70 (diff) | |
download | emacs-e61b85336519a21c984490d16345c6aa1ed519c2.tar.gz |
* 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.h | 16 |
1 files changed, 16 insertions, 0 deletions
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. */ #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. |