bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: socklen_t


From: Simon Josefsson
Subject: Re: socklen_t
Date: Thu, 08 Sep 2005 15:28:29 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Can I install this?  Albert Chin proposed a better M4 test, but the
legal procedure will take time, and I'm already using my version in a
few projects.  When the legal problems has been fixed, we can change
it to use the new macro and test that.  What do you think?

Simon Josefsson <address@hidden> writes:

> 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])
> +])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]