diff options
author | Paul Eggert <[email protected]> | 2011-03-16 19:36:27 -0700 |
---|---|---|
committer | Paul Eggert <[email protected]> | 2011-03-16 19:36:27 -0700 |
commit | 57048744037204ae0cef40cdca9d8a967a4e1407 (patch) | |
tree | b69ab81e4eb48a4f95d911e9ae8a25f7da38a8dd /src | |
parent | 615f2d59a5ee849bc46c3fa57d41fd136f2d0962 (diff) |
* s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
* process.c (allocate_pty): Don't declare stb unless it's needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 3 | ||||
-rw-r--r-- | src/process.c | 2 | ||||
-rw-r--r-- | src/s/irix6-5.h | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fa08263a80..45cb41024a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-17 Paul Eggert <[email protected]> + * 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". (CONSTANTLIM): Remove; unused. (METER_CODE, Bscan_buffer, Bread_char, Bset_mark): diff --git a/src/process.c b/src/process.c index 39fa26e8b5..a026174bd2 100644 --- a/src/process.c +++ b/src/process.c @@ -545,7 +545,6 @@ allocate_pty (void) for (i = 0; i < 16; i++) #endif { - struct stat stb; /* Used in some PTY_OPEN. */ #ifdef PTY_NAME_SPRINTF PTY_NAME_SPRINTF #else @@ -562,6 +561,7 @@ allocate_pty (void) three failures in a row before deciding that we've reached the end of the ptys. */ int failed_count = 0; + struct stat stb; if (stat (pty_name, &stb) < 0) { diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 92465ded2e..d283571d8f 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -60,6 +60,7 @@ char *_getpty(); #define PTY_OPEN \ { \ struct sigaction ocstat, cstat; \ + struct stat stb; \ char * name; \ sigemptyset(&cstat.sa_mask); \ cstat.sa_handler = SIG_DFL; \ @@ -95,5 +96,3 @@ char *_getpty(); /* Tested on Irix 6.5. SCM worked on earlier versions. */ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS - - |