bug-gnulib
[Top][All Lists]
Advanced

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

Re: arpa_inet_h: new module, replaces inet_ntop


From: Simon Josefsson
Subject: Re: arpa_inet_h: new module, replaces inet_ntop
Date: Wed, 28 Jun 2006 13:10:50 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Here is a new arpa_inet module, much simplified.  It's now unrelated
> to inet_?to?, it's only for ntohl, ntohs, etc, and possibly other
> arpa/inet.h functions that do exist in winsock2.h.

Ok to install this?  It is now unrelated to inet_ntop, but only
provides a arpa/inet.h on MinGW.  It is very similar to the just
installed sys_select module.

> Index: m4/arpa_inet_h.m4
> ===================================================================
> RCS file: m4/arpa_inet_h.m4
> diff -N m4/arpa_inet_h.m4
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ m4/arpa_inet_h.m4 17 Jun 2006 19:12:34 -0000
> @@ -0,0 +1,18 @@
> +# arpa_inet_h.m4 serial 1
> +dnl Copyright (C) 2006 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 Written by Simon Josefsson
> +
> +AC_DEFUN([gl_HEADER_ARPA_INET],
> +[
> +  AC_CHECK_HEADERS_ONCE([arpa/inet.h])
> +  if test $ac_cv_header_arpa_inet_h = yes; then
> +    ARPA_INET_H=''
> +  else
> +    ARPA_INET_H='arpa/inet.h'
> +  fi
> +  AC_SUBST(ARPA_INET_H)
> +])
> Index: modules/arpa_inet
> ===================================================================
> RCS file: modules/arpa_inet
> diff -N modules/arpa_inet
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ modules/arpa_inet 17 Jun 2006 19:12:34 -0000
> @@ -0,0 +1,34 @@
> +Description:
> +A <arpa/inet.h> for systems lacking it (e.g., Mingw).
> +
> +Files:
> +m4/arpa_inet_h.m4
> +
> +Depends-on:
> +sys_socket
> +
> +configure.ac:
> +gl_HEADER_ARPA_INET
> +
> +Makefile.am:
> +BUILT_SOURCES += $(ARPA_INET_H)
> +
> +# We need the following in order to create <arpa/inet.h> when the system
> +# doesn't have one.
> +arpa/inet.h:
> +     test -d arpa || mkdir arpa
> +     echo '#include <sys/socket.h>' >address@hidden
> +     mv address@hidden $@
> +MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
> +
> +mostlyclean-local:
> +     -rmdir arpa 2>/dev/null
> +
> +Include:
> +#include <arpa/inet.h>
> +
> +License:
> +LGPL
> +
> +Maintainer:
> +Simon Josefsson




reply via email to

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