From owner-freebsd-tcltk@FreeBSD.ORG Thu Nov 7 15:23:37 2013 Return-Path: Delivered-To: tcltk@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0684D2DA for ; Thu, 7 Nov 2013 15:23:37 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel09.rubas.ch (cpanel09.rubas.ch [195.182.222.79]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2879278B for ; Thu, 7 Nov 2013 15:23:36 +0000 (UTC) Received: from 98-41.199-178.cust.bluewin.ch ([178.199.41.98]:58229 helo=gahrfit.gahr.ch) by cpanel09.rubas.ch with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1VeR7B-001Nxz-Di; Thu, 07 Nov 2013 16:03:22 +0100 Date: Thu, 7 Nov 2013 16:03:18 +0100 From: Pietro Cerutti To: Sean Kelly Subject: Re: FD_SETSIZE Message-ID: <20131107150318.GA88680@gahrfit.gahr.ch> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kVXhAStRUZ/+rrGn" Content-Disposition: inline In-Reply-To: X-PGP-Key: fp="DA6D E106 A5B8 54B8 5DD8 6D49 ADD0 D38E A192 089E"; id="0xA192089E"; get=; get=; User-Agent: Mutt/1.5.21 (2010-09-15) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel09.rubas.ch X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Get-Message-Sender-Via: cpanel09.rubas.ch: authenticated_id: gahr@gahr.ch Cc: "tcltk@freebsd.org" X-BeenThere: freebsd-tcltk@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: gahr@FreeBSD.org List-Id: FreeBSD-specific Tcl/Tk discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 15:23:37 -0000 --kVXhAStRUZ/+rrGn Content-Type: multipart/mixed; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2013-Nov-06, 20:41, Sean Kelly wrote: > At FlightAware, we are extensive users of both Tcl and FreeBSD. However, = we are currently applying a local patch to the lang/tcl85 port to increase = FD_SETSIZE from the default 1024 to 4096 so that select() can handle larger= socket collections. Hello Sean, I see that FD_SETSIZE is defined to 1024 in sys/select.h. Tcl 85 just gets it from there. Because of this, I don't know whether it really makes sense to patch Tcl. At least by default. An OPTION (maybe off by default) to increase this by specifying -DFD_SETSIZE=3D4096 in CFLAGS. > Would it be possible to get this patch added to the port? Alternatively, = can we add a configure option to the port that enables this? I=E2=80=99d be= happy to provide a patch or send-pr, I just want to see if there is intere= st/objections to this. Would the attached patch be ok to you? Thanks, --=20 Pietro Cerutti The FreeBSD Project gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp --s2ZSL+KKDSLx8OML Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="tcl85-large-fdset.diff" Content-Transfer-Encoding: quoted-printable Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile (revision 333105) +++ Makefile (working copy) @@ -16,11 +16,12 @@ =20 LICENSE=3D BSD =20 -OPTIONS_DEFINE=3D TCLMAN TZDATA MODULES THREADS +OPTIONS_DEFINE=3D TCLMAN TZDATA MODULES THREADS LARGE_FDSET OPTIONS_DEFAULT=3DMODULES THREADS TCLMAN_DESC=3D Install Tcl function manpages TZDATA_DESC=3D Install Tcl timezone data MODULES_DESC=3D Install Tcl common modules +LARGE_FDSET_DESC=3D Set FD_SETSIZE to 4096 =20 NO_STAGE=3D yes WRKSRC=3D ${WRKDIR}/${DISTNAME:S/-src//}/unix @@ -74,6 +75,10 @@ CONFIGURE_ARGS+=3D--without-tzdata .endif =20 +.if ${PORT_OPTIONS:MLARGE_FDSET} +CFLAGS+=3D -DFD_SETSIZE=3D4096 +.endif + post-patch: ${REINPLACE_CMD} -e \ 's|@TCL_BUILD_LIB_SPEC@|@TCL_LIB_SPEC@|; \ --s2ZSL+KKDSLx8OML-- --kVXhAStRUZ/+rrGn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJSe6uyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQTZERTEwNkE1Qjg1NEI4NUREODZENDlB REQwRDM4RUExOTIwODlFAAoJEK3Q046hkgieS84P/Rb3rdyeMGZbuJ7Tq7G7uDJx 7WdLTtk6WOQPux4Izs3VEcEhGKROYJ1D2hluba4xqgdnBgCtRD5HLNo1kb7KvVde C5mrRb9/wJYI8vgC4Q+8B3L+vwUmLDGWthrvLFtlIQTBU8dLnRT49PsXWOtch0Q/ BT1/tr1qZkD1NFUdqTvOzvBFQXc45UySQQLedZyhWFTUDyvMqRtUna7eFs+2TUdS 9GkvOmKCurHPWgKa0YB/UlxyWTJXZVQBCWrEhw54tZPF3gjRBxf3r7ij0yAl4RaR jFD6uZebyxKFxSEZY66oRu5pKMdlZ0UczXGauFeQGE2+yWhGYbsAAQjJmNmyE+Zz RCdTG8p3sd/DXIagpfAtXIFx6T4nrgRyu3oofAX5OMeDtJH6q3MJ69s0IYTpBDOg nKoczYZxF5NrOoMwIrb1jyzCFYexs/5dGbZPK8y+2LVbym0cKFfs3ROuw+d7Tujx ZKYMwFCf0eXwdUxFI/M3Sdsp9UyNN55kqBVLVyYlRjT6o98Jk8GwptTr789QKdSZ Z5d07SaEpftVtwDrucbYoSL3s1Y83t/f4ff5XJpC5ZIDPo0bwYkrIIbfkh6FWhOc 7SOPQCBEqjQcotB9ZoQBNbJrVkzs4DM28kaAL1Wenmp6ZDDxpHdORBq2r5EDsExo 7lce8dpqozxF0yX570pE =d7xS -----END PGP SIGNATURE----- --kVXhAStRUZ/+rrGn--