Date: Wed, 21 Jun 2000 20:57:00 -0400 From: Will Andrews <andrews@technologist.com> 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> In-Reply-To: <200006211301.PAA74131@merkur.virtual-earth.de>; from Mathias.Picker@virtual-earth.de on Wed, Jun 21, 2000 at 03:06:02PM %2B0200 References: <200006211301.PAA74131@merkur.virtual-earth.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <andrewsw@purdue.edu> <will@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000621205700.C47446>