Add file, was missing from last commit.
[pspp] / lib / arpa_inet.in.h
1 /* Provide a arpa/inet header file for systems lacking it (read: MinGW)
2    Copyright (C) 2008 Free Software Foundation, Inc.
3
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)
7    any later version.
8
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.
13
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.  */
17
18 #ifndef _GL_ARPA_INET_H
19 #define _GL_ARPA_INET_H
20
21 /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
22    under MinGW. */
23 #include <sys/socket.h>
24
25 #if @GNULIB_INET_NTOP@
26 # include <inet_ntop.h>
27 #elif defined GNULIB_POSIXCHECK
28 # undef inet_ntop
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))
33 #endif
34
35 #if @GNULIB_INET_PTON@
36 # include <inet_pton.h>
37 #elif defined GNULIB_POSIXCHECK
38 # undef inet_pton
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))
43 #endif
44
45 #endif /* _GL_ARPA_INET_H */