Author: tkreuzer
Date: Fri Jun 8 13:10:52 2012
New Revision: 56710
URL:
http://svn.reactos.org/svn/reactos?rev=56710&view=rev
Log:
[PSDK]
- Add missing C definition of InlineIsEqualGUID in guiddef.h
- Use portable TYPE_ALIGNMENT instead of __builtin_alignof in mstcpip.h
- Remove definition of DL_EUI48 from netiodef.h, since it's already definied as a
forward declaration in mstcpip.h
- Make WS2TCPIP_INLINE extern inline instead of static inline to fix warnings about usage
in non static inline functions
Modified:
trunk/reactos/include/psdk/guiddef.h
trunk/reactos/include/psdk/mstcpip.h
trunk/reactos/include/psdk/netiodef.h
trunk/reactos/include/psdk/ws2ipdef.h
Modified: trunk/reactos/include/psdk/guiddef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/guiddef.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/guiddef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/guiddef.h [iso-8859-1] Fri Jun 8 13:10:52 2012
@@ -119,10 +119,17 @@
((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2]
&&
((unsigned long *) &rguid1)[3] == ((unsigned long *) &rguid2)[3]);
}
+#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2),
sizeof(GUID)))
-#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2),
sizeof(GUID)))
#else /* defined(__cplusplus) && !defined(CINTERFACE) */
+
+#define InlineIsEqualGUID(rguid1, rguid2) \
+ (((unsigned long *)rguid1)[0] == ((unsigned long *)rguid2)[0] && \
+ ((unsigned long *)rguid1)[1] == ((unsigned long *)rguid2)[1] && \
+ ((unsigned long *)rguid1)[2] == ((unsigned long *)rguid2)[2] && \
+ ((unsigned long *)rguid1)[3] == ((unsigned long *)rguid2)[3])
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
+
#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
#if defined(__cplusplus) && !defined(CINTERFACE)
Modified: trunk/reactos/include/psdk/mstcpip.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mstcpip.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/mstcpip.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/mstcpip.h [iso-8859-1] Fri Jun 8 13:10:52 2012
@@ -470,7 +470,7 @@
}
#define INET_IS_ALIGNED(Pointer, Type) \
- (((ULONG_PTR)Pointer & (__builtin_alignof(Type)-1)) == 0)
+ (((ULONG_PTR)Pointer & (TYPE_ALIGNMENT(Type)-1)) == 0)
MSTCPIP_INLINE
SCOPE_LEVEL
Modified: trunk/reactos/include/psdk/netiodef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/netiodef.h?re…
==============================================================================
--- trunk/reactos/include/psdk/netiodef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/netiodef.h [iso-8859-1] Fri Jun 8 13:10:52 2012
@@ -140,7 +140,7 @@
#define icmp4_cksum Header.Checksum
#define icmp4_un_data32 Data32
#define icmp4_un_data16 Data16
-#define icmp4_un_data8 Data8
+#define icmp4_un_data8 Data8
#define icmp4_dataun Data
#define icmp4_data32 icmp4_dataun.icmp4_un_data32
#define icmp4_data16 icmp4_dataun.icmp4_un_data16
@@ -404,7 +404,6 @@
DL_EI48 Ei48;
};
};
-typedef union _DL_EUI48 DL_EUI48, *PDL_EUI48;
C_ASSERT(DL_ADDRESS_LENGTH_MAXIMUM >= sizeof(DL_EUI48));
@@ -1197,7 +1196,7 @@
typedef struct _NPI_MODULEID {
USHORT Length;
NPI_MODULEID_TYPE Type;
-#ifdef __midl
+#ifdef __midl
[switch_type(NPI_MODULEID_TYPE), switch_is(Type)]
#endif
union {
Modified: trunk/reactos/include/psdk/ws2ipdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ws2ipdef.h?re…
==============================================================================
--- trunk/reactos/include/psdk/ws2ipdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ws2ipdef.h [iso-8859-1] Fri Jun 8 13:10:52 2012
@@ -13,7 +13,7 @@
#ifdef _MSC_VER
#define WS2TCPIP_INLINE __inline
#else
-#define WS2TCPIP_INLINE static inline
+#define WS2TCPIP_INLINE extern inline
#endif
#include <in6addr.h>
@@ -355,21 +355,21 @@
WS2TCPIP_INLINE
BOOLEAN
IN6_IS_ADDR_ANYCAST(CONST IN6_ADDR *a) {
- return (IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a) ||
+ return (IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a) ||
IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(a));
}
WS2TCPIP_INLINE
BOOLEAN
IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR *a) {
- return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
((a->s6_bytes[1] & 0xc0) == 0x80));
}
WS2TCPIP_INLINE
BOOLEAN
IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR *a) {
- return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
((a->s6_bytes[1] & 0xc0) == 0xc0));
}
@@ -451,13 +451,13 @@
((a->s6_bytes[1] & 0xf) == 0xe));
}
-WS2TCPIP_INLINE
+WS2TCPIP_INLINE
VOID
IN6_SET_ADDR_UNSPECIFIED(PIN6_ADDR a) {
memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
}
-WS2TCPIP_INLINE
+WS2TCPIP_INLINE
VOID
IN6_SET_ADDR_LOOPBACK(PIN6_ADDR a) {
memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
@@ -520,7 +520,7 @@
typedef enum _MULTICAST_MODE_TYPE {
MCAST_INCLUDE = 0,
- MCAST_EXCLUDE
+ MCAST_EXCLUDE
} MULTICAST_MODE_TYPE;
typedef struct ip_mreq {