From: Paul Eggert Date: Thu, 17 Mar 2011 02:36:27 +0000 (-0700) Subject: * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57048744037204ae0cef40cdca9d8a967a4e1407;p=emacs.git * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling. * process.c (allocate_pty): Don't declare stb unless it's needed. --- diff --git a/src/ChangeLog b/src/ChangeLog index fa08263a80a..45cb41024ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-17 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. + * 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 39fa26e8b54..a026174bd23 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 92465ded2ef..d283571d8fb 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 - -