Mercurial > vim
comparison src/pty.c @ 12716:351cf7c67bbe v8.0.1236
patch 8.0.1236: Mac features are confusing
commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 28 21:11:06 2017 +0200
patch 8.0.1236: Mac features are confusing
Problem: Mac features are confusing.
Solution: Make feature names more consistent, add "osxdarwin". Rename
feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Oct 2017 21:15:35 +0200 |
parents | b74f5036a434 |
children | 8412df1479a3 |
comparison
equal
deleted
inserted
replaced
12715:279ec0abb4ac | 12716:351cf7c67bbe |
---|---|
87 | 87 |
88 #if HAVE_SYS_PTEM_H | 88 #if HAVE_SYS_PTEM_H |
89 # include <sys/ptem.h> | 89 # include <sys/ptem.h> |
90 #endif | 90 #endif |
91 | 91 |
92 #if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS) | 92 #if !defined(SUN_SYSTEM) && !defined(VMS) |
93 # include <sys/ioctl.h> | 93 # include <sys/ioctl.h> |
94 #endif | 94 #endif |
95 | 95 |
96 #if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL) | 96 #if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL) |
97 # include <sys/ttold.h> | 97 # include <sys/ttold.h> |
377 ; | 377 ; |
378 for (l = PTYRANGE0; (*p = *l) != '\0'; l++) | 378 for (l = PTYRANGE0; (*p = *l) != '\0'; l++) |
379 { | 379 { |
380 for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++) | 380 for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++) |
381 { | 381 { |
382 #if !defined(MACOS) || defined(USE_CARBONIZED) | |
383 if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1) | 382 if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1) |
384 #else | |
385 if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA)) == -1) | |
386 #endif | |
387 continue; | 383 continue; |
388 q[0] = *l; | 384 q[0] = *l; |
389 q[1] = *d; | 385 q[1] = *d; |
390 #ifndef MACOS | |
391 if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) | 386 if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) |
392 { | 387 { |
393 close(f); | 388 close(f); |
394 continue; | 389 continue; |
395 } | 390 } |
396 #endif | |
397 #if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3) | 391 #if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3) |
398 /* Hack to ensure that the slave side of the pty is | 392 /* Hack to ensure that the slave side of the pty is |
399 * unused. May not work in anything other than SunOS4.1 | 393 * unused. May not work in anything other than SunOS4.1 |
400 */ | 394 */ |
401 { | 395 { |