]> git.eshelyaron.com Git - emacs.git/commitdiff
* s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Mar 2011 02:36:27 +0000 (19:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Mar 2011 02:36:27 +0000 (19:36 -0700)
* process.c (allocate_pty): Don't declare stb unless it's needed.

src/ChangeLog
src/process.c
src/s/irix6-5.h

index fa08263a80a08a588b3f494b10337cb071200a49..45cb41024ae69697d3a56eb9eaca9a5b8ceca612 100644 (file)
@@ -1,5 +1,8 @@
 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".
        (CONSTANTLIM): Remove; unused.
        (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
index 39fa26e8b5441b6f6869d58e3a37a145185de9c1..a026174bd23dbc513d4f1b9900e7404c7a1624d6 100644 (file)
@@ -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)
              {
index 92465ded2ef27a8a8fb902952de9313d5245a810..d283571d8fb1d487a01c908d8f13619e23e09525 100644 (file)
@@ -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
-
-