diff options
| author | Glenn Morris | 2012-07-12 00:43:05 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-07-12 00:43:05 -0700 |
| commit | 3f922c3769247bef882fb399abcb601a066f4a31 (patch) | |
| tree | 05a41e428449fc846c155959a03788507ec757e6 /src/s/gnu-linux.h | |
| parent | 0ab7b23ae0a12669fef7f5939fbb0161f29280a2 (diff) | |
| download | emacs-3f922c3769247bef882fb399abcb601a066f4a31.tar.gz emacs-3f922c3769247bef882fb399abcb601a066f4a31.zip | |
Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF from src/s to configure
* configure.ac (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): Move here from src/s.
* src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
* src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
* src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
Diffstat (limited to 'src/s/gnu-linux.h')
| -rw-r--r-- | src/s/gnu-linux.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 20a2354a2ab..626113b119c 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -27,31 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | 27 | ||
| 28 | #if defined HAVE_GRANTPT | 28 | #if defined HAVE_GRANTPT |
| 29 | #define UNIX98_PTYS | 29 | #define UNIX98_PTYS |
| 30 | |||
| 31 | #ifdef HAVE_GETPT | ||
| 32 | #define PTY_NAME_SPRINTF | ||
| 33 | #else /* not HAVE_GETPT */ | ||
| 34 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | ||
| 35 | #endif /* not HAVE_GETPT */ | ||
| 36 | |||
| 37 | /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to | ||
| 38 | prevent sigchld_handler from intercepting the child's death. */ | ||
| 39 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 40 | { \ | ||
| 41 | char *ptyname; \ | ||
| 42 | \ | ||
| 43 | sigblock (sigmask (SIGCHLD)); \ | ||
| 44 | if (grantpt (fd) == -1 || unlockpt (fd) == -1 \ | ||
| 45 | || !(ptyname = ptsname(fd))) \ | ||
| 46 | { \ | ||
| 47 | sigunblock (sigmask (SIGCHLD)); \ | ||
| 48 | close (fd); \ | ||
| 49 | return -1; \ | ||
| 50 | } \ | ||
| 51 | snprintf (pty_name, sizeof pty_name, "%s", ptyname); \ | ||
| 52 | sigunblock (sigmask (SIGCHLD)); \ | ||
| 53 | } | ||
| 54 | |||
| 55 | #endif /* HAVE_GRANTPT */ | 30 | #endif /* HAVE_GRANTPT */ |
| 56 | 31 | ||
| 57 | /* Here, on a separate page, add any special hacks needed | 32 | /* Here, on a separate page, add any special hacks needed |