diff options
Diffstat (limited to 'src/s')
| -rw-r--r-- | src/s/darwin.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/s/darwin.h b/src/s/darwin.h index d8da3e3174c..5b162ea08a3 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h | |||
| @@ -37,6 +37,10 @@ Boston, MA 02111-1307, USA. */ | |||
| 37 | #define BSD_SYSTEM | 37 | #define BSD_SYSTEM |
| 38 | /* #define VMS */ | 38 | /* #define VMS */ |
| 39 | 39 | ||
| 40 | #ifndef DARWIN | ||
| 41 | #define DARWIN 1 | ||
| 42 | #endif | ||
| 43 | |||
| 40 | /* MAC_OS is used to conditionally compile code common to both MAC_OS8 | 44 | /* MAC_OS is used to conditionally compile code common to both MAC_OS8 |
| 41 | and MAC_OSX. */ | 45 | and MAC_OSX. */ |
| 42 | #ifdef MAC_OSX | 46 | #ifdef MAC_OSX |
| @@ -103,25 +107,17 @@ Boston, MA 02111-1307, USA. */ | |||
| 103 | 107 | ||
| 104 | /* | 108 | /* |
| 105 | * Define HAVE_PTYS if the system supports pty devices. | 109 | * Define HAVE_PTYS if the system supports pty devices. |
| 110 | * Note: PTYs are broken on darwin <6. Use at your own risk. | ||
| 106 | */ | 111 | */ |
| 107 | 112 | ||
| 108 | #define HAVE_PTYS | 113 | #define HAVE_PTYS |
| 109 | 114 | ||
| 110 | 115 | /** | |
| 111 | /* | 116 | * PTYs only work correctly on Darwin 7 or higher. So make the |
| 112 | * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION | 117 | * default for process-connection-type dependent on the kernel |
| 113 | * Test the operating system release and only allow PTYs if it is greater | 118 | * version. |
| 114 | * than 7. | ||
| 115 | */ | 119 | */ |
| 116 | #define MIN_PTY_KERNEL_VERSION '7' | 120 | #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 | 121 | ||
| 126 | /* | 122 | /* |
| 127 | * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | 123 | * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate |