Fixes for netdb.h.
[gnulib.git] / lib / netdb.in.h
1 /* Provide a netdb.h header file for systems lacking it (read: MinGW).
2    Copyright (C) 2008 Free Software Foundation, Inc.
3    Written by Simon Josefsson.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2, or (at your option)
8    any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software Foundation,
17    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
18
19 /* This file is supposed to be used on platforms that lack <netdb.h>.
20    It is intended to provide definitions and prototypes needed by an
21    application.  */
22
23 #ifndef _GL_NETDB_H
24
25 #if @HAVE_NETDB_H@
26
27 @PRAGMA_SYSTEM_HEADER@
28
29 /* The include_next requires a split double-inclusion guard.  */
30 # @INCLUDE_NEXT@ @NEXT_NETDB_H@
31
32 #endif
33
34 #ifndef _GL_NETDB_H
35 #define _GL_NETDB_H
36
37 #if @HAVE_NETDB_H@
38
39 /* Declarations for a platform that has <netdb.h>.  */
40
41 #else
42
43 /* Get netdb.h definitions such as struct hostent for MinGW.  */
44 #include <sys/socket.h>
45
46 /* Declarations for a platform that lacks <netdb.h>.  */
47
48 #endif /* HAVE_NETDB_H */
49
50 #endif /* _GL_NETDB_H */
51 #endif /* _GL_NETDB_H */