aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-07-11 23:34:40 -0700
committerGlenn Morris2012-07-11 23:34:40 -0700
commit6e7778482fb5fc9e527b799db7c83b210674c2a8 (patch)
tree0f8abc321d764ce068acbeea87bd7b947e1eea65 /src
parent4a7edc24ba4da27f44151df4e4541c86c35d3037 (diff)
downloademacs-6e7778482fb5fc9e527b799db7c83b210674c2a8.tar.gz
emacs-6e7778482fb5fc9e527b799db7c83b210674c2a8.zip
Move FIRST_PTY_LETTER, PTY_ITERATION from src/s to configure
* configure.ac (FIRST_PTY_LETTER PTY_ITERATION): Move here from src/s. * src/s/aix4-2.h, src/s/bsd-common.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/template.h: * src/s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/s/aix4-2.h1
-rw-r--r--src/s/bsd-common.h3
-rw-r--r--src/s/cygwin.h1
-rw-r--r--src/s/darwin.h6
-rw-r--r--src/s/gnu-linux.h11
-rw-r--r--src/s/hpux10-20.h4
-rw-r--r--src/s/irix6-5.h7
-rw-r--r--src/s/template.h4
-rw-r--r--src/s/usg5-4-common.h4
10 files changed, 7 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7b6eaa3820a..19b89259067 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-12 Glenn Morris <rgm@gnu.org>
2
3 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
6
12012-07-12 Dmitry Antipov <dmantipov@yandex.ru> 72012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
2 8
3 Use empty_unibyte_string where applicable. 9 Use empty_unibyte_string where applicable.
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 4287eea9dcc..326d7217acb 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28 28
29/* In AIX, you allocate a pty by opening /dev/ptc to get the master side. 29/* In AIX, you allocate a pty by opening /dev/ptc to get the master side.
30 To get the name of the slave side, you just ttyname() the master side. */ 30 To get the name of the slave side, you just ttyname() the master side. */
31#define PTY_ITERATION int c; for (c = 0; !c ; c++)
32#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc"); 31#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc");
33#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); 32#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));
34 33
diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h
index 901ed0c490e..681f6599010 100644
--- a/src/s/bsd-common.h
+++ b/src/s/bsd-common.h
@@ -36,6 +36,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
36 36
37/* For mem-limits.h. */ 37/* For mem-limits.h. */
38#define BSD4_2 38#define BSD4_2
39
40/* First pty name is /dev/ptyp0. */
41#define FIRST_PTY_LETTER 'p'
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index fb5d3b08f4e..89db0a047bc 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -17,7 +17,6 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */
21#define PTY_NAME_SPRINTF /* none */ 20#define PTY_NAME_SPRINTF /* none */
22#define PTY_TTY_NAME_SPRINTF /* none */ 21#define PTY_TTY_NAME_SPRINTF /* none */
23#define PTY_OPEN \ 22#define PTY_OPEN \
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 7b4b5e196e3..68667ed7c90 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -30,12 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30 distinguish OS X from pure Darwin. */ 30 distinguish OS X from pure Darwin. */
31#define DARWIN_OS 31#define DARWIN_OS
32 32
33/* Letter to use in finding device name of first pty,
34 if system supports pty's. 'a' means it is /dev/ptya0 */
35#define FIRST_PTY_LETTER 'p'
36
37/* Run only once. We need a `for'-loop because the code uses `continue'. */
38#define PTY_ITERATION int i; for (i = 0; i < 1; i++)
39#define PTY_NAME_SPRINTF /* none */ 33#define PTY_NAME_SPRINTF /* none */
40#define PTY_TTY_NAME_SPRINTF /* none */ 34#define PTY_TTY_NAME_SPRINTF /* none */
41/* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. 35/* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8.
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 5e8691b55ce..dd4de41f84b 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -28,9 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#if defined HAVE_GRANTPT 28#if defined HAVE_GRANTPT
29#define UNIX98_PTYS 29#define UNIX98_PTYS
30 30
31/* Run only once. We need a `for'-loop because the code uses `continue'. */
32#define PTY_ITERATION int i; for (i = 0; i < 1; i++)
33
34#ifdef HAVE_GETPT 31#ifdef HAVE_GETPT
35#define PTY_NAME_SPRINTF 32#define PTY_NAME_SPRINTF
36#define PTY_OPEN fd = getpt () 33#define PTY_OPEN fd = getpt ()
@@ -56,13 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56 sigunblock (sigmask (SIGCHLD)); \ 53 sigunblock (sigmask (SIGCHLD)); \
57 } 54 }
58 55
59#else /* not HAVE_GRANTPT */ 56#endif /* HAVE_GRANTPT */
60
61/* Letter to use in finding device name of first pty,
62 if system supports pty's. 'p' means it is /dev/ptyp0 */
63#define FIRST_PTY_LETTER 'p'
64
65#endif /* not HAVE_GRANTPT */
66 57
67/* Here, on a separate page, add any special hacks needed 58/* Here, on a separate page, add any special hacks needed
68 to make Emacs work on this system. For example, 59 to make Emacs work on this system. For example,
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index 47908c9a4c0..bb81eb800e4 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -24,10 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#define USG5 24#define USG5
25#define HPUX 25#define HPUX
26 26
27/* Letter to use in finding device name of first pty,
28 if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */
29#define FIRST_PTY_LETTER 'p'
30
31/* Special hacks needed to make Emacs run on this system. */ 27/* Special hacks needed to make Emacs run on this system. */
32 28
33/* This is how to get the device name of the tty end of a pty. */ 29/* This is how to get the device name of the tty end of a pty. */
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index dd7a00d0ba7..cd7b2902026 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -26,11 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#undef SETUP_SLAVE_PTY 27#undef SETUP_SLAVE_PTY
28 28
29/* Letter to use in finding device name of first pty,
30 if system supports pty's. 'a' means it is /dev/ptya0 */
31#undef FIRST_PTY_LETTER
32#define FIRST_PTY_LETTER 'q'
33
34/* No need to use sprintf to get the tty name--we get that from _getpty. */ 29/* No need to use sprintf to get the tty name--we get that from _getpty. */
35#define PTY_TTY_NAME_SPRINTF 30#define PTY_TTY_NAME_SPRINTF
36/* No need to get the pty name at all. */ 31/* No need to get the pty name at all. */
@@ -39,8 +34,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#ifdef emacs 34#ifdef emacs
40char *_getpty(); 35char *_getpty();
41#endif 36#endif
42/* We need only try once to open a pty. */
43#define PTY_ITERATION
44/* Here is how to do it. */ 37/* Here is how to do it. */
45#define PTY_OPEN \ 38#define PTY_OPEN \
46{ \ 39{ \
diff --git a/src/s/template.h b/src/s/template.h
index a343a4b006e..f14890bc292 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -29,10 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29/* #define BSD4_2 */ 29/* #define BSD4_2 */
30/* #define BSD_SYSTEM */ 30/* #define BSD_SYSTEM */
31 31
32/* Letter to use in finding device name of first pty,
33 if system supports pty's. 'a' means it is /dev/ptya0. */
34#define FIRST_PTY_LETTER 'a'
35
36/* subprocesses should be undefined if you do NOT want to 32/* subprocesses should be undefined if you do NOT want to
37 have code for asynchronous subprocesses 33 have code for asynchronous subprocesses
38 (as used in M-x compile and M-x shell). 34 (as used in M-x compile and M-x shell).
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h
index 561b3ad38ec..94d83dd81ef 100644
--- a/src/s/usg5-4-common.h
+++ b/src/s/usg5-4-common.h
@@ -64,10 +64,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
64 this is all we need. */ 64 this is all we need. */
65#define TIOCSIGSEND TIOCSIGNAL 65#define TIOCSIGSEND TIOCSIGNAL
66 66
67/* This change means that we don't loop through allocate_pty too many
68 times in the (rare) event of a failure. */
69#define FIRST_PTY_LETTER 'z'
70
71/* This sets the name of the master side of the PTY. */ 67/* This sets the name of the master side of the PTY. */
72#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); 68#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
73 69