Commit 57048744 authored by Paul Eggert's avatar Paul Eggert

* s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.

* process.c (allocate_pty): Don't declare stb unless it's needed.
parent 615f2d59
2011-03-17 Paul Eggert <eggert@cs.ucla.edu> 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
* s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
* process.c (allocate_pty): Don't declare stb unless it's needed.
* bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else". * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
(CONSTANTLIM): Remove; unused. (CONSTANTLIM): Remove; unused.
(METER_CODE, Bscan_buffer, Bread_char, Bset_mark): (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
...@@ -545,7 +545,6 @@ allocate_pty (void) ...@@ -545,7 +545,6 @@ allocate_pty (void)
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
#endif #endif
{ {
struct stat stb; /* Used in some PTY_OPEN. */
#ifdef PTY_NAME_SPRINTF #ifdef PTY_NAME_SPRINTF
PTY_NAME_SPRINTF PTY_NAME_SPRINTF
#else #else
...@@ -562,6 +561,7 @@ allocate_pty (void) ...@@ -562,6 +561,7 @@ allocate_pty (void)
three failures in a row before deciding that we've reached the three failures in a row before deciding that we've reached the
end of the ptys. */ end of the ptys. */
int failed_count = 0; int failed_count = 0;
struct stat stb;
if (stat (pty_name, &stb) < 0) if (stat (pty_name, &stb) < 0)
{ {
......
...@@ -60,6 +60,7 @@ char *_getpty(); ...@@ -60,6 +60,7 @@ char *_getpty();
#define PTY_OPEN \ #define PTY_OPEN \
{ \ { \
struct sigaction ocstat, cstat; \ struct sigaction ocstat, cstat; \
struct stat stb; \
char * name; \ char * name; \
sigemptyset(&cstat.sa_mask); \ sigemptyset(&cstat.sa_mask); \
cstat.sa_handler = SIG_DFL; \ cstat.sa_handler = SIG_DFL; \
...@@ -95,5 +96,3 @@ char *_getpty(); ...@@ -95,5 +96,3 @@ char *_getpty();
/* Tested on Irix 6.5. SCM worked on earlier versions. */ /* Tested on Irix 6.5. SCM worked on earlier versions. */
#define GC_SETJMP_WORKS 1 #define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment