From owner-freebsd-ports Wed Jun 21 17:58:50 2000 Delivered-To: freebsd-ports@freebsd.org Received: from server1.mich.com (server1.mich.com [198.108.16.2]) by hub.freebsd.org (Postfix) with ESMTP id 77BA037B74C for ; Wed, 21 Jun 2000 17:58:47 -0700 (PDT) (envelope-from will@almanac.yi.org) Received: from argon.gryphonsoft.com (pm003-024.dialup.bignet.net [64.79.80.120]) by server1.mich.com (8.9.3/8.9.3) with ESMTP id UAA32383; Wed, 21 Jun 2000 20:58:37 -0400 Received: by argon.gryphonsoft.com (Postfix, from userid 1000) id 84543195D; Wed, 21 Jun 2000 20:57:00 -0400 (EDT) Date: Wed, 21 Jun 2000 20:57:00 -0400 From: Will Andrews To: Mathias.Picker@virtual-earth.de Cc: freebsd-ports@FreeBSD.ORG Subject: Re: when did change to socklen_t happen and how to detect it Message-ID: <20000621205700.C47446@argon.gryphonsoft.com> References: <200006211301.PAA74131@merkur.virtual-earth.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200006211301.PAA74131@merkur.virtual-earth.de>; from Mathias.Picker@virtual-earth.de on Wed, Jun 21, 2000 at 03:06:02PM +0200 X-Operating-System: FreeBSD 5.0-CURRENT i386 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Jun 21, 2000 at 03:06:02PM +0200, Mathias.Picker@virtual-earth.de wrote: > I'm trying to port oz 1.1.1 (www.mozart-oz.org) to FreeBSD4-STABLE. > > Last time I compiled it on 3.x and everything went fine (if I remember > correctly, maybe it was still 2.x), but now I get a lot of > > passing int* as arg 3 of accept.... changes signedness > > For now I'm using __FreeBSD__ > 3 to ifdef around this, my question is: > what would be the "correct" way to do this. The program's configure script should detect whether there is a socklen_t in the system, and have appropriate magic in config.h, i.e.: #ifndef HAVE_SOCKLEN_T #typedef socklen_t int #endif Then simply call -DHAVE_SOCKLEN_T where necessary, or they can use a perl script to change the value of: @HAVE_SOCKLEN_T@ #ifndef HAVE_SOCKLEN_T #typedef socklen_t int #endif and the perl script can change @HAVE_SOCKLEN_T@ to #define HAVE_SOCKLEN_T or #undef HAVE_SOCKLEN_T, depending on whether the system has socklen_t or not. With ports, I normally just do the "quick fix" and simply insert (socklen_t *) where necessary, for typecast. The latest 3-STABLE (either very recent 3.4-S or 3.5-S) is the oldest FreeBSD we support and thus we can use typecasts like that (because 3-STABLE has socklen_t). -- Will Andrews GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w--- ?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ G++>+++ e->++++ h! r-->+++ y? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message