From owner-freebsd-ports Mon Mar 20 8:59:29 2000 Delivered-To: freebsd-ports@freebsd.org Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by hub.freebsd.org (Postfix) with ESMTP id E626137B86D; Mon, 20 Mar 2000 08:59:21 -0800 (PST) (envelope-from fenner@research.att.com) Received: from alliance.research.att.com (alliance.research.att.com [135.207.26.26]) by mail-blue.research.att.com (Postfix) with ESMTP id 4EC814CE24; Mon, 20 Mar 2000 11:59:11 -0500 (EST) Received: from windsor.research.att.com (windsor.research.att.com [135.207.26.46]) by alliance.research.att.com (8.8.7/8.8.7) with ESMTP id LAA21240; Mon, 20 Mar 2000 11:59:10 -0500 (EST) From: Bill Fenner Received: (from fenner@localhost) by windsor.research.att.com (8.8.8+Sun/8.8.5) id IAA00411; Mon, 20 Mar 2000 08:58:28 -0800 (PST) Message-Id: <200003201658.IAA00411@windsor.research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: jabley@patho.gen.nz Subject: Re: Changed assumptions in 3.4-STABLE for OpenSSH port Cc: freebsd-ports@freebsd.org, green@freebsd.org Date: Mon, 20 Mar 2000 08:58:27 -0800 Versions: dmail (solaris) 2.2g/makemail 2.9a Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >I don't know the history of sa_family_t and >socklen_t in /usr/include/sys/socket.h, socklen_t was introduced by a standards body, and was defined to be an unsigned integral value. The sockaddr length argument to all of the socket functions was defined to be a socklen_t. This causes some wonderful incompatibility problems, since historically this argument has been an int. gcc-2.95.2 complains about signed/unsignedness botches with -pedantic. It also has -pedantic-errors on by default when compiling C++ source. So, using u_int32_t when the prototype is an int in a C++ program causes the build to error out. (Previously-working C++ code that passed ints started failing on 4.0; this was the cause of many bento-isms on ports on 4.0 and is why adding -pedantic to CXXFLAGS fixed them. Yay standards.) In FreeBSD 4.0, the standard was completely integrated, i.e. the function prototypes were updated at the time of the introduction of the socklen_t type. In 3.x, the socklen_t type was brought in without any of the other changes, creating the inconsistency. The temporary fix is to make socklen_t an int on 3.x (done in rev 1.27.2.4 of src/sys/sys/socket.h). This causes problems for anything that makes bad assumptions about socklen_t in 3.x. Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message