]> code.delx.au - gnu-emacs/blobdiff - src/process.c
Port USE_STACK_LISP_OBJECTS fix to Clang
[gnu-emacs] / src / process.c
index 73704c03ee71988f5991ccec1caa346b73b37c78..1eac5e12663b70967fc921d2702cae9b1c66e133 100644 (file)
@@ -1,6 +1,6 @@
 /* Asynchronous subprocess control for GNU Emacs.
 
-Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2015 Free Software
+Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2016 Free Software
 Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -103,13 +103,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "coding.h"
 #include "process.h"
 #include "frame.h"
-#include "termhooks.h"
 #include "termopts.h"
-#include "commands.h"
 #include "keyboard.h"
 #include "blockinput.h"
-#include "dispextern.h"
-#include "composite.h"
 #include "atimer.h"
 #include "sysselect.h"
 #include "syssignal.h"
@@ -2376,7 +2372,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
        {
          struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
          uint16_t *ip6 = (uint16_t *)&sin6->sin6_addr;
-         len = sizeof (sin6->sin6_addr) + 1;
+         len = sizeof (sin6->sin6_addr) / 2 + 1;
          hostport = XINT (p->contents[--len]);
          sin6->sin6_port = htons (hostport);
          for (i = 0; i < len; i++)
@@ -5036,10 +5032,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                   && FD_ISSET (channel, &Available))
                  || (d->condition & FOR_WRITE
                      && FD_ISSET (channel, &write_mask))))
-           {
-             d->func (channel, d->data);
-             FD_CLR (channel, &Available);
-           }
+            d->func (channel, d->data);
        }
 
       for (channel = 0; channel <= max_process_desc; channel++)
@@ -7183,8 +7176,10 @@ setup_process_coding_systems (Lisp_Object process)
 }
 
 DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
-       doc: /* Return the (or a) process associated with BUFFER.
-BUFFER may be a buffer or the name of one.  */)
+       doc: /* Return the (or a) live process associated with BUFFER.
+BUFFER may be a buffer or the name of one.
+Return nil if all processes associated with BUFFER have been
+deleted or killed.  */)
   (register Lisp_Object buffer)
 {
 #ifdef subprocesses