Mailing List Archive

autoconf check for socklen_t
Here's a configure check to see if socklen_t is defined. Even though my
man pages on linux say accept(2) takes (int *) as it's 3rd arg, the
sys/socket.h files begs to differ.

If not defined (which is doesn't seem to be on AIX 4.2.1), it can be
explicitly typedef'ed to (unsigned int). Now do mainstream code changes
get submitted back to the openbsd group, or would it be better to submit to
this list?

After defining all those variables to socklen_t, this should clean up the
spurious errors spewed forth from AIX's native compiler, about the uncast
connect, accept and bind calls.

context diff on 1.2.1pre21

*** configure.in~ Sat Dec 25 18:21:48 1999
--- configure.in Mon Dec 27 00:55:17 1999
***************
*** 180,185 ****
--- 180,197 ----
[AC_MSG_RESULT(no)]
)

+ AC_MSG_CHECKING([For socklen_t])
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>],
+ [#include <sys/socket.h>],
+ [socklen_t foo; foo = 1235;],
+ [
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ AC_MSG_RESULT(yes)
+ ],
+ [AC_MSG_RESULT(no)]
+ )
+
dnl Check PAM strerror arguments
AC_MSG_CHECKING([whether pam_strerror takes only one argument])
AC_TRY_COMPILE(
Re: autoconf check for socklen_t [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28 Dec 1999, Darren Hall wrote:

> Here's a configure check to see if socklen_t is defined. Even
> though my man pages on linux say accept(2) takes (int *) as it's 3rd
> arg, the sys/socket.h files begs to differ.

Thanks, applied. I am now typedefing (unsigned int) to socklen_t if
the definition is missing.

> If not defined (which is doesn't seem to be on AIX 4.2.1), it can
> be explicitly typedef'ed to (unsigned int). Now do mainstream code
> changes get submitted back to the openbsd group, or would it be
> better to submit to this list?

For portability changes, it is best to send the via this list. Feel
free to send any other patches as well, I feed them back to the
OpenBSD people if I think they are relevant.

> After defining all those variables to socklen_t, this should clean
> up the spurious errors spewed forth from AIX's native compiler,
> about the uncast connect, accept and bind calls.

Does 1.2.1pre22 (with your patch) work correctly on AIX?

Thanks,
Damien

- --
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4aHJMormJ9RG1dI8RApuXAJ9dXuOUVfPYgyxZLRPvcl+pRKD7bACgzmAd
icirF/nHMgVFwGmvekaXU/c=
=kioU
-----END PGP SIGNATURE-----
Re: autoconf check for socklen_t [ In reply to ]
> For portability changes, it is best to send the via this list. Feel
> free to send any other patches as well, I feed them back to the
> OpenBSD people if I think they are relevant.

I'll have all the socklen_t patches sent back to the list soon.

> Does 1.2.1pre22 (with your patch) work correctly on AIX?

I've got it to compile via native compiler and working on AIX 4.2.1. I
will see if I can check out 4.3.2 as well.

The utmp support works, I've confirmed X forwarding, and both types of
cipher.
I had problems with scp, and had to explicitly setup a .ssh/environment
file
to include the /usr/local/bin.

I'll have to download the latest version and check to see if _PATH_STDPATH
(which isn't defined on AIX) includes $bindir if not already there at
compile
time.