1 /* Provide a arpa/inet header file for systems lacking it (read: MinGW)
2 Copyright (C) 2008 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 #ifndef _GL_ARPA_INET_H
19 #define _GL_ARPA_INET_H
21 /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
23 #include <sys/socket.h>
25 #if @GNULIB_INET_NTOP@
26 # include <inet_ntop.h>
27 #elif defined GNULIB_POSIXCHECK
29 # define inet_ntop(af,src,dst,cnt) \
30 (GL_LINK_WARNING ("inet_ntop doesn't exist on mingw - " \
31 "use gnulib module inet_ntop for portability"), \
32 inet_ntop (af, src, dst, cnt))
35 #if @GNULIB_INET_PTON@
36 # include <inet_pton.h>
37 #elif defined GNULIB_POSIXCHECK
39 # define inet_pton(af,src,dst) \
40 (GL_LINK_WARNING ("inet_pton doesn't exist on mingw - " \
41 "use gnulib module inet_pton for portability"), \
42 inet_pton (af, src, dst))
45 #endif /* _GL_ARPA_INET_H */