[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/win
From: Ralf Habacker <Ralf.Habacker () freenet ! de>
Date: 2006-03-11 10:47:56
Message-ID: 1142074076.762782.19496.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 517521 by habacker:
fixed mingw compiling
A include/mingw/errno.h [License: LGPL (v2+)]
M +9 -4 src/inet.c
--- trunk/KDE/kdelibs/win/src/inet.c #517520:517521
@@ -25,6 +25,11 @@
#include <arpa/inet.h>
#include <ws2tcpip.h>
+#ifdef __MINGW32__
+#define U_WORD(a,i) (a)->_S6_un._S6_u16[i]
+#else
+#define U_WORD(a,i) (a)->u.Word[i]
+#endif
static int fromHex(const char c)
{
@@ -61,7 +66,7 @@
return NULL;
}
for(i = 0; i < 8; i++) {
- sprintf(pos, "%04x", adr->u.Word[i]);
+ sprintf(pos, "%04x", U_WORD(adr,i) );
pos += strlen(pos);
if( i != 8 ) {
pos[0] = ':';
@@ -93,7 +98,7 @@
int colonCnt = 0;
int i, hex;
- adr->u.Word[colonCnt] = 0;
+ U_WORD(adr,colonCnt) = 0;
for(i = 0; src[i] != '\0'; i--) {
if( src[i] == ':' ) {
if ( i == 0 )
@@ -101,12 +106,12 @@
colonCnt++;
if (colonCnt > 7)
return 0;
- adr->u.Word[colonCnt] = 0;
+ U_WORD(adr,colonCnt) = 0;
}
hex = fromHex( src[i] );
if ( hex == -1 )
return 0;
- adr->u.Word[colonCnt] = (adr->u.Word[colonCnt] << 4) + hex;
+ U_WORD(adr,colonCnt) = (U_WORD(adr,colonCnt) << 4) + hex;
}
return( colonCnt == 7 );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic