Add network address and socket types
[platform/upstream/glib.git] / gio / gnetworkingprivate.h
1 /* GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright (C) 2008 Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __G_NETWORKINGPRIVATE_H__
22 #define __G_NETWORKINGPRIVATE_H__
23
24 #ifdef G_OS_WIN32
25
26 #define WINVER 0x0501 // FIXME?
27 #include <winsock2.h>
28 #undef interface
29 #include <ws2tcpip.h>
30 #include <windns.h>
31
32 #else /* !G_OS_WIN32 */
33
34 #define BIND_4_COMPAT
35
36 #include <arpa/inet.h>
37 #include <arpa/nameser.h>
38 /* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
39  * won't actually work since <features.h> has already been included at
40  * this point. So we define __USE_GNU instead.
41  */
42 #define __USE_GNU
43 #include <netdb.h>
44 #undef __USE_GNU
45 #include <netinet/in.h>
46 #include <netinet/tcp.h>
47 #include <resolv.h>
48 #include <sys/socket.h>
49 #include <sys/un.h>
50
51 #endif
52
53 #endif /* __G_NETWORKINGPRIVATE_H__ */