dinput/tests: Avoid assigning values twice (PVS-Studio).
[wine/multimedia.git] / include / inaddr.h
blob72a50284092e5cc794bd8953d2aa7dcd9e3d93a6
1 /*
2 * Copyright 2010 Detlef Riekenberg
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library 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 GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __INADDR_H__
21 #define __INADDR_H__
23 #ifdef USE_WS_PREFIX
24 #define WS(x) WS_##x
25 #else
26 #define WS(x) x
27 #endif
29 typedef struct WS(in_addr)
31 union {
32 struct {
33 UCHAR s_b1,s_b2,s_b3,s_b4;
34 } S_un_b;
35 struct {
36 USHORT s_w1,s_w2;
37 } S_un_w;
38 ULONG S_addr;
39 } S_un;
40 } IN_ADDR, *PIN_ADDR, *LPIN_ADDR;
42 #undef WS
44 #ifndef USE_WS_PREFIX
45 #define s_addr S_un.S_addr
46 #define s_net S_un.S_un_b.s_b1
47 #define s_host S_un.S_un_b.s_b2
48 #define s_lh S_un.S_un_b.s_b3
49 #define s_impno S_un.S_un_b.s_b4
50 #define s_imp S_un.S_un_w.s_w2
51 #else
52 #define WS_s_addr S_un.S_addr
53 #define WS_s_net S_un.S_un_b.s_b1
54 #define WS_s_host S_un.S_un_b.s_b2
55 #define WS_s_lh S_un.S_un_b.s_b3
56 #define WS_s_impno S_un.S_un_b.s_b4
57 #define WS_s_imp S_un.S_un_w.s_w2
58 #endif /* USE_WS_PREFIX */
60 #endif /* __INADDR_H__ */