Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2000 08:58:27 -0800
From:      Bill Fenner <fenner@research.att.com>
To:        jabley@patho.gen.nz
Cc:        freebsd-ports@freebsd.org, green@freebsd.org
Subject:   Re: Changed assumptions in 3.4-STABLE for OpenSSH port
Message-ID:  <200003201658.IAA00411@windsor.research.att.com>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003201658.IAA00411>