diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-15 20:16:40 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-16 09:23:46 +0100 |
commit | 8912421cf3829a4fd65877fd1255125c191f6f89 (patch) | |
tree | 6b89fecf0738a1f80792bbe7453730f7882f1d54 /lib/netinet_in.in.h | |
parent | 3fe87cf7aff396d7bd993aa009f48eb8afd6c1cd (diff) | |
download | guile-8912421cf3829a4fd65877fd1255125c191f6f89.tar.gz |
Use Gnulib's `inet_ntop' and `inet_pton' modules.
* m4/gnulib-cache.m4: Add `inet_ntop' and `inet_pton'.
* configure.ac: Don't check for `inet_ntop' and `inet_pton'.
* libguile/socket.c (scm_inet_pton, scm_inet_ntop): Compile regardless
of `HAVE_INET_PTON' and `HAVE_INET_NTOP' respectively.
* libguile/filesys.c: Use <stdlib.h> instead of <canonicalize.h>.
Diffstat (limited to 'lib/netinet_in.in.h')
-rw-r--r-- | lib/netinet_in.in.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/netinet_in.in.h b/lib/netinet_in.in.h new file mode 100644 index 000000000..8c94f6a48 --- /dev/null +++ b/lib/netinet_in.in.h @@ -0,0 +1,47 @@ +/* Substitute for <netinet/in.h>. + Copyright (C) 2007-2008 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GL_NETINET_IN_H + +#if @HAVE_NETINET_IN_H@ + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif + +/* On many platforms, <netinet/in.h> assumes prior inclusion of + <sys/types.h>. */ +# include <sys/types.h> + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@ + +#endif + +#ifndef _GL_NETINET_IN_H +#define _GL_NETINET_IN_H + +#if !@HAVE_NETINET_IN_H@ + +/* A platform that lacks <netinet/in.h>. */ + +# include <sys/socket.h> + +#endif + +#endif /* _GL_NETINET_IN_H */ +#endif /* _GL_NETINET_IN_H */ |