allocate_pty() tries all the different known easy ways of opening
a pty. In case of failure, we resort to the old BSD-style pty
grovelling code in allocate_pty_the_old_fashioned_way(). */
+#ifndef FORCE_ALLOCATE_PTY_THE_OLD_FASHIONED_WAY
int master_fd = -1;
const char *slave_name = NULL;
const char *clone = NULL;
lose:
if (master_fd >= 0)
close (master_fd);
+#endif /* ndef FORCE_ALLOCATE_PTY_THE_OLD_FASHIONED_WAY */
return allocate_pty_the_old_fashioned_way ();
}
while (1)
{
- ssize_t writeret;
+ Lstream_data_count writeret;
chunklen = Lstream_read (lstream, chunkbuf, 512);
if (chunklen <= 0)
if (EMACS_KILLPG (pgid, signo) == -1)
{
/* It's not an error if our victim is already dead.
- And we can't rely on the result of killing a zombie, since
- XPG 4.2 requires that killing a zombie fail with ESRCH,
- while FIPS 151-2 requires that it succeeds! */
+ And we can't rely on the result of killing a zombie, since
+ XPG 4.2 requires that killing a zombie fail with ESRCH,
+ while FIPS 151-2 requires that it succeeds! */
#ifdef ESRCH
if (errno != ESRCH)
#endif
xzero (hints);
hints.ai_flags = AI_CANONNAME;
+#ifdef IPV6_CANONICALIZE
hints.ai_family = AF_UNSPEC;
+#else
+ hints.ai_family = PF_INET;
+#endif
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0;
LISP_STRING_TO_EXTERNAL (host, ext_host, Qnative);
failed_connect = 1;
close (s);
+ s = -1;
speed_up_interrupts ();
memset (&sa, 0, sizeof(sa));
sa.sin_family = AF_INET;
sa.sin_port = theport;
- sa.sin_addr.s_addr = htonl (inet_addr ((char *) XSTRING_DATA (dest)));
+ sa.sin_addr.s_addr = inet_addr ((char *) XSTRING_DATA (dest));
/* Socket configuration for reading ------------------------ */
}
/* join multicast group */
- imr.imr_multiaddr.s_addr = htonl (inet_addr ((char *) XSTRING_DATA (dest)));
+ imr.imr_multiaddr.s_addr = inet_addr ((char *) XSTRING_DATA (dest));
imr.imr_interface.s_addr = htonl (INADDR_ANY);
if (setsockopt (rs, IPPROTO_IP, IP_ADD_MEMBERSHIP,
&imr, sizeof (struct ip_mreq)) < 0)