summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2003-01-10 19:10:30 +0000
committerKen Raeburn <raeburn@mit.edu>2003-01-10 19:10:30 +0000
commit23e3eda70694a11fd6ac484017fbfc07c5ec68ff (patch)
tree4b2e2cba875948eb4a5085fbf7d43f6c50788468 /src/include
parentfae39968a963b5ca7c1c98c354bffa6b9b522b5e (diff)
downloadkrb5-23e3eda70694a11fd6ac484017fbfc07c5ec68ff.tar.gz
krb5-23e3eda70694a11fd6ac484017fbfc07c5ec68ff.tar.xz
krb5-23e3eda70694a11fd6ac484017fbfc07c5ec68ff.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog7
-rw-r--r--src/include/port-sockets.h25
-rw-r--r--src/include/socket-utils.h17
3 files changed, 32 insertions, 17 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index 269b7fc809..0c27caf1ff 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,5 +1,12 @@
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.
diff --git a/src/include/port-sockets.h b/src/include/port-sockets.h
index e23ac1a3fd..34489669b9 100644
--- a/src/include/port-sockets.h
+++ b/src/include/port-sockets.h
@@ -91,6 +91,23 @@ typedef WSABUF sg_buf;
#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...
*/
@@ -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 c16a22db8f..e5ea8f8a90 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