]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/gsocket.c
Fixed display issues for Panther now that wxTextCtrl has been fixed there.
[wxWidgets.git] / src / mac / carbon / gsocket.c
index 45275d917656426d1980e81b562c60dc9d53aea3..07fd19e193d3241d5d95fc59f57ab6595df84a67 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
@@ -156,7 +163,6 @@ pascal void OTInetEventHandler(void*s, OTEventCode event, OTResult result, void
        
        if ( event == kOTSyncIdleEvent )
        {
-               YieldToAnyThread() ;
                return ;
        }
 
@@ -196,6 +202,11 @@ static void SetDefaultEndpointModes(EndpointRef ep , void *data )
 
 /* Global initialisers */
 
+void GSocket_SetGUIFunctions(struct GSocketGUIFunctionsTable *table)
+{
+    // do nothing, wxMac doesn't have wxBase-GUI separation yet
+}
+
 int GSocket_Init()
 {
     return TRUE;
@@ -1323,7 +1334,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;
 }
@@ -1404,7 +1415,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)