From 23e3eda70694a11fd6ac484017fbfc07c5ec68ff Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 10 Jan 2003 19:10:30 +0000 Subject: [PATCH] Move socklen_t and sockaddr_storage definitions to port-sockets.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15108 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 7 +++++++ src/include/port-sockets.h | 25 +++++++++++++++++++++++++ src/include/socket-utils.h | 17 ----------------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 269b7fc80..0c27caf1f 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,5 +1,12 @@ 2003-01-10 Ken Raeburn + * socket-utils.h (socklen_t, krb5int_sockaddr_storage): Move + definitions... + * port-sockets.h (socklen_t, krb5int_sockaddr_storage): ...to + here. + (socket) [!_WIN32 && S_SPLINT_S]: Declare with Splint + annotations. + * configure.in: Use V5_AC_OUTPUT_MAKEFILE instead of K5_GEN_MAKEFILE and K5_AC_OUTPUT. diff --git a/src/include/port-sockets.h b/src/include/port-sockets.h index e23ac1a3f..34489669b 100644 --- a/src/include/port-sockets.h +++ b/src/include/port-sockets.h @@ -91,6 +91,23 @@ typedef WSABUF sg_buf; #include /* For FIONBIO on Solaris. */ #endif +/* Either size_t or int or unsigned int is probably right. Under + SunOS 4, it looks like int is desired, according to the accept man + page. */ +#ifndef HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + +/* XXX should only be done if sockaddr_storage not found */ +#ifndef HAVE_STRUCT_SOCKADDR_STORAGE +struct krb5int_sockaddr_storage { + struct sockaddr_in s; + /* Plenty of slop just in case we get an ipv6 address anyways. */ + long extra[16]; +}; +#define sockaddr_storage krb5int_sockaddr_storage +#endif + /* * Compatability with WinSock calls on MS-Windows... */ @@ -139,4 +156,12 @@ typedef struct iovec sg_buf; #endif /* HAVE_MACSOCK_H */ #endif /* _WIN32 */ + +#if !defined(_WIN32) +/* UNIX or ...? */ +# ifdef S_SPLINT_S +extern int socket (int, int, int) /*@*/; +# endif +#endif + #endif /*_PORT_SOCKET_H*/ diff --git a/src/include/socket-utils.h b/src/include/socket-utils.h index c16a22db8..e5ea8f8a9 100644 --- a/src/include/socket-utils.h +++ b/src/include/socket-utils.h @@ -53,23 +53,6 @@ /* for HAVE_SOCKLEN_T, KRB5_USE_INET6, etc */ #include "krb5/autoconf.h" -/* Either size_t or int or unsigned int is probably right. Under - SunOS 4, it looks like int is desired, according to the accept man - page. */ -#ifndef HAVE_SOCKLEN_T -typedef int socklen_t; -#endif - -/* XXX should only be done if sockaddr_storage not found */ -#ifndef HAVE_STRUCT_SOCKADDR_STORAGE -struct krb5int_sockaddr_storage { - struct sockaddr_in s; - /* Plenty of slop just in case we get an ipv6 address anyways. */ - long extra[16]; -}; -#define sockaddr_storage krb5int_sockaddr_storage -#endif - #if defined (__GNUC__) /* * There's a lot of confusion between pointers to different sockaddr -- 2.26.2