[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
socklen_t
From: |
Simon Josefsson |
Subject: |
socklen_t |
Date: |
Wed, 31 Aug 2005 16:18:20 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
How about this?
2005-08-31 Simon Josefsson <address@hidden>
* modules/socklen: New file.
2005-08-31 Simon Josefsson <address@hidden>
* socklen.m4: New file.
Index: modules/socklen
===================================================================
RCS file: modules/socklen
diff -N modules/socklen
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ modules/socklen 31 Aug 2005 14:12:39 -0000
@@ -0,0 +1,20 @@
+Description:
+Declare socklen_t in config.h if the system doesn't have it.
+
+Files:
+m4/socklen.m4
+
+Depends-on:
+
+configure.ac:
+gl_SOCKLEN_T
+
+Makefile.am:
+
+Include:
+
+License:
+unlimited
+
+Maintainer:
+Simon Josefsson
Index: m4/socklen.m4
===================================================================
RCS file: m4/socklen.m4
diff -N m4/socklen.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ m4/socklen.m4 31 Aug 2005 14:12:39 -0000
@@ -0,0 +1,23 @@
+# socklen.m4 serial 1
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_SOCKLEN_T],
+[
+ AC_CHECK_HEADERS_ONCE(sys/types.h sys/socket.h netdb.h)
+ AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [int],
+ [Map `socklen_t' to `int' if it is missing.])], [
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif])
+])
- socklen_t,
Simon Josefsson <=