head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.70 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.68 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.66 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.3.0.64 pkgsrc-2025Q2-base:1.3 pkgsrc-2025Q1:1.3.0.62 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.3.0.60 pkgsrc-2024Q4-base:1.3 pkgsrc-2024Q3:1.3.0.58 pkgsrc-2024Q3-base:1.3 pkgsrc-2024Q2:1.3.0.56 pkgsrc-2024Q2-base:1.3 pkgsrc-2024Q1:1.3.0.54 pkgsrc-2024Q1-base:1.3 pkgsrc-2023Q4:1.3.0.52 pkgsrc-2023Q4-base:1.3 pkgsrc-2023Q3:1.3.0.50 pkgsrc-2023Q3-base:1.3 pkgsrc-2023Q2:1.3.0.48 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.3.0.46 pkgsrc-2023Q1-base:1.3 pkgsrc-2022Q4:1.3.0.44 pkgsrc-2022Q4-base:1.3 pkgsrc-2022Q3:1.3.0.42 pkgsrc-2022Q3-base:1.3 pkgsrc-2022Q2:1.3.0.40 pkgsrc-2022Q2-base:1.3 pkgsrc-2022Q1:1.3.0.38 pkgsrc-2022Q1-base:1.3 pkgsrc-2021Q4:1.3.0.36 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.34 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.3.0.32 pkgsrc-2021Q2-base:1.3 pkgsrc-2021Q1:1.3.0.30 pkgsrc-2021Q1-base:1.3 pkgsrc-2020Q4:1.3.0.28 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.26 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.22 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.2 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.24 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.20 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.18 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.16 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.14 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.12 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.10 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.8 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.6 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.4 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.2.0.96 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.94 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.92 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.90 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.88 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.86 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.84 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.82 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.80 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.78 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.76 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.74 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.72 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.70 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.68 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.66 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.64 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.62 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.60 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.58 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.56 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.54 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.52 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.50 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.48 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.46 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.44 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.42 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.40 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.38 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.36 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.34 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.32 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.30 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.28 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.26 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.24 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.22 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.20 pkgsrc-2008Q1:1.2.0.18 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.16 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.14 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.12 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.10 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.8 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.6 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.4 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.2 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.1.1.1.0.18 pkgsrc-2005Q4-base:1.1.1.1 pkgsrc-2005Q3:1.1.1.1.0.16 pkgsrc-2005Q3-base:1.1.1.1 pkgsrc-2005Q2:1.1.1.1.0.14 pkgsrc-2005Q2-base:1.1.1.1 pkgsrc-2005Q1:1.1.1.1.0.12 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.10 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-2004Q3:1.1.1.1.0.8 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-2004Q2:1.1.1.1.0.6 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-2004Q1:1.1.1.1.0.4 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.2 pkgsrc-2003Q4-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2017.07.23.05.22.38; author dholland; state Exp; branches; next 1.2; commitid FIZHW0LOfPvDrj0A; 1.2 date 2006.01.04.17.00.32; author joerg; state Exp; branches; next 1.1; 1.1 date 2003.04.11.00.31.45; author uebayasi; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2003.04.11.00.31.45; author uebayasi; state Exp; branches; next ; desc @@ 1.3 log @Roll a couple bits into the jumbo patch, one from patch-aj, another mentioned in passing in PR 43091. Bump PKGREVISION again, to 24. @ text @$NetBSD: patch-aj,v 1.2 2006/01/04 17:00:32 joerg Exp $ --- src/process.c.orig 2000-05-23 19:10:16.000000000 +0000 +++ src/process.c @@@@ -1,7 +1,18 @@@@ +/* + * Locally hacked process.c to add ipv6 support. -wsr + * + * The configure.in file should define "HAVE_GETADDRINFO" if it is found + * in libc. + * + */ + /* Asynchronous subprocess control for GNU Emacs. Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. + ipv6 changes are + Copyright (C) 1999 Wolfgang S. Rupprecht + This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify @@@@ -1810,15 +1820,21 @@@@ Fourth arg SERVICE is name of the servic { Lisp_Object proc; register int i; +#ifdef HAVE_GETADDRINFO + struct addrinfo hints, *res, *lres; + int ret = 0; + int xerrno = 0; + char *portstring, portbuf [128]; +#else /* HAVE_GETADDRINFO */ struct sockaddr_in address; struct servent *svc_info; struct hostent *host_info_ptr, host_info; char *(addr_list[2]); IN_ADDR numeric_addr; - int s, outch, inch; - char errstring[80]; - int port; struct hostent host_info_fixed; + int port; +#endif /* HAVE_GETADDRINFO */ + int s = -1, outch, inch; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; int retry = 0; int count = specpdl_ptr - specpdl; @@@@ -1831,6 +1847,22 @@@@ Fourth arg SERVICE is name of the servic GCPRO4 (name, buffer, host, service); CHECK_STRING (name, 0); CHECK_STRING (host, 0); + +#ifdef HAVE_GETADDRINFO + /* + * caution: service can either be a string or int. + * Convert to a C string for later use by getaddrinfo. + */ + if (INTEGERP (service)) { + snprintf (portbuf, sizeof (portbuf), "%d", XINT (service)); + portstring = portbuf; + } + else + { + CHECK_STRING (service, 0); + portstring = XSTRING (service)->data; + } +#else /* HAVE_GETADDRINFO */ if (INTEGERP (service)) port = htons ((unsigned short) XINT (service)); else @@@@ -1841,6 +1873,7 @@@@ Fourth arg SERVICE is name of the servic error ("Unknown service \"%s\"", XSTRING (service)->data); port = svc_info->s_port; } +#endif /* HAVE_GETADDRINFO */ /* Slow down polling to every ten seconds. Some kernels have a bug which causes retrying connect to fail @@@@ -1850,6 +1883,75 @@@@ Fourth arg SERVICE is name of the servic #endif #ifndef TERM +#ifdef HAVE_GETADDRINFO /* We have a modern OS. -wsr */ + immediate_quit = 1; + QUIT; + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = 0; + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + ret = getaddrinfo(XSTRING (host)->data, portstring, &hints, &res); + if (ret) + error("%s/%s %s", XSTRING (host)->data, portstring, gai_strerror(ret)); + immediate_quit = 0; + + for (lres = res; lres ; lres = lres->ai_next) + { + s = socket(lres->ai_family, lres->ai_socktype, lres->ai_protocol); + if (s < 0) + { + xerrno = errno; + continue; + } + + /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR) + when connect is interrupted. So let's not let it get interrupted. + Note we do not turn off polling, because polling is only used + when not interrupt_input, and thus not normally used on the systems + which have this bug. On systems which use polling, there's no way + to quit if polling is turned off. */ + if (interrupt_input) + unrequest_sigio (); + + loop: + immediate_quit = 1; + QUIT; + + if (connect(s, lres->ai_addr, lres->ai_addrlen) == 0 || + errno == EISCONN) + break; + + xerrno = errno; + immediate_quit = 0; + + if (errno == EINTR) + goto loop; + if (errno == EADDRINUSE && retry < 20) + { + /* A delay here is needed on some FreeBSD systems, + and it is harmless, since this retrying takes time anyway + and should be infrequent. */ + Fsleep_for (make_number (1), Qnil); + retry++; + goto loop; + } + + close(s); + s = -1; + } + + freeaddrinfo(res); + if (s < 0) + { + if (interrupt_input) + request_sigio (); + + errno = xerrno; + report_file_error ("connection failed", + Fcons (host, Fcons (name, Qnil))); + } +#else /* HAVE_GETADDRINFO */ while (1) { #ifdef TRY_AGAIN @@@@ -1940,6 +2042,7 @@@@ Fourth arg SERVICE is name of the servic report_file_error ("connection failed", Fcons (host, Fcons (name, Qnil))); } +#endif /* HAVE_GETADDRINFO */ immediate_quit = 0; @ 1.2 log @Add DragonFly support. Fix errno. Remove patch-ac, it gets overriden by the GNU_CONFIGURE magic anyway. @ text @d1 1 a1 1 $NetBSD$ a23 8 @@@@ -147,7 +158,6 @@@@ Lisp_Object Qlast_nonmenu_event; #include "syswait.h" -extern int errno; extern char *strerror (); #ifdef VMS extern char *sys_errlist[]; @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-aj,v 1.8 2000/09/08 16:56:58 itojun Exp $ d3 2 a4 2 --- src/process.c.orig Wed May 24 04:10:16 2000 +++ src/process.c Mon Sep 4 14:15:19 2000 d24 9 a32 1 @@@@ -1810,15 +1821,21 @@@@ d57 1 a57 1 @@@@ -1831,6 +1848,22 @@@@ d80 1 a80 1 @@@@ -1841,6 +1874,7 @@@@ d88 1 a88 1 @@@@ -1850,6 +1884,75 @@@@ d164 1 a164 1 @@@@ -1940,6 +2043,7 @@@@ @ 1.1.1.1 log @Re-import of Emacs 20, which has settled down in editors/emacs. @ text @@