]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/gsocket.c
supporting readonly and singleline attributes for non-mlte textrcontrol
[wxWidgets.git] / src / mac / carbon / gsocket.c
index 9e3ba3079a4c3e75ef5dc34ed064c596d7ef37a8..073d97c483d1aa245318acd3a0102e13416582d6 100644 (file)
 
 #endif /* __GSOCKET_STANDALONE__ */
 
+#ifndef ntohl
+#define        ntohl(x)        (x)
+#define        ntohs(x)        (x)
+#define        htonl(x)        (x)
+#define        htons(x)        (x)
+#endif
+
 void wxCYield() ;
 #ifdef __WXDEBUG__
 #define qDebug 1
@@ -1328,7 +1335,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address,
 
   CHECK_ADDRESS(address, INET, GSOCK_INVADDR);
 
-  address->m_host = hostaddr ;
+  address->m_host = htonl(hostaddr) ;
 
   return GSOCK_NOERROR;
 }
@@ -1409,7 +1416,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address)
   assert(address != NULL); 
   CHECK_ADDRESS(address, INET, 0); 
 
-  return address->m_host;
+  return ntohl(address->m_host);
 }
 
 unsigned short GAddress_INET_GetPort(GAddress *address)