1/* -*- buffer-read-only: t -*- vi: set ro: */ 2/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 3#line 1 4/* A GNU-like <arpa/inet.h>. 5 6 Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3, or (at your option) 11 any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software Foundation, 20 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 21 22#ifndef _GL_ARPA_INET_H 23 24/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc 25 under MinGW. 26 But avoid namespace pollution on glibc systems. */ 27#ifndef __GLIBC__ 28# include <sys/socket.h> 29#endif 30 31#if @HAVE_ARPA_INET_H@ 32 33# if __GNUC__ >= 3 34@PRAGMA_SYSTEM_HEADER@ 35# endif 36 37/* The include_next requires a split double-inclusion guard. */ 38# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@ 39 40#endif 41 42#ifndef _GL_ARPA_INET_H 43#define _GL_ARPA_INET_H 44 45/* The definition of GL_LINK_WARNING is copied here. */ 46 47/* The definition of _GL_ARG_NONNULL is copied here. */ 48 49#ifdef __cplusplus 50extern "C" { 51#endif 52 53#if @GNULIB_INET_NTOP@ 54# if !@HAVE_DECL_INET_NTOP@ 55/* Converts an internet address from internal format to a printable, 56 presentable format. 57 AF is an internet address family, such as AF_INET or AF_INET6. 58 SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' 59 (for AF_INET6). 60 DST points to a buffer having room for CNT bytes. 61 The printable representation of the address (in numeric form, not 62 surrounded by [...], no reverse DNS is done) is placed in DST, and 63 DST is returned. If an error occurs, the return value is NULL and 64 errno is set. If CNT bytes are not sufficient to hold the result, 65 the return value is NULL and errno is set to ENOSPC. A good value 66 for CNT is 46. 67 68 For more details, see the POSIX:2001 specification 69 <http://www.opengroup.org/susv3xsh/inet_ntop.html>. */ 70extern const char *inet_ntop (int af, const void *restrict src, 71 char *restrict dst, socklen_t cnt) 72 _GL_ARG_NONNULL ((2, 3)); 73# endif 74#elif defined GNULIB_POSIXCHECK 75# undef inet_ntop 76# define inet_ntop(af,src,dst,cnt) \ 77 (GL_LINK_WARNING ("inet_ntop is unportable - " \ 78 "use gnulib module inet_ntop for portability"), \ 79 inet_ntop (af, src, dst, cnt)) 80#endif 81 82#if @GNULIB_INET_PTON@ 83# if !@HAVE_DECL_INET_PTON@ 84extern int inet_pton (int af, const char *restrict src, void *restrict dst) 85 _GL_ARG_NONNULL ((2, 3)); 86# endif 87#elif defined GNULIB_POSIXCHECK 88# undef inet_pton 89# define inet_pton(af,src,dst) \ 90 (GL_LINK_WARNING ("inet_pton is unportable - " \ 91 "use gnulib module inet_pton for portability"), \ 92 inet_pton (af, src, dst)) 93#endif 94 95#ifdef __cplusplus 96} 97#endif 98 99#endif /* _GL_ARPA_INET_H */ 100#endif /* _GL_ARPA_INET_H */ 101