2003-01-10 Ken Raeburn <raeburn@mit.edu>
+ * 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.
#include <sys/filio.h> /* 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...
*/
#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*/
/* 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