X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/f6fc00103fd047abc6c707db8912d3e71c336481..e19fadd7784a90d2bfe73c6b69e4a31ee785b953:/mac/macnet.c diff --git a/mac/macnet.c b/mac/macnet.c index 34d68852..106a6315 100644 --- a/mac/macnet.c +++ b/mac/macnet.c @@ -27,12 +27,14 @@ static struct macnet_stack ot = { ot_register, ot_new, ot_newlistener, ot_addr_error, ot_poll, ot_cleanup }; +#if !TARGET_API_MAC_CARBON static struct macnet_stack mactcp = { mactcp_namelookup, mactcp_nonamelookup, mactcp_getaddr, mactcp_hostname_is_local, mactcp_address_is_local, mactcp_addrtype, mactcp_addrcopy, mactcp_addr_free, mactcp_register, mactcp_new, mactcp_newlistener, mactcp_addr_error, mactcp_poll, mactcp_cleanup }; +#endif void sk_init(void) { @@ -42,9 +44,11 @@ void sk_init(void) stack = &ot; else #endif +#if !TARGET_API_MAC_CARBON if (mactcp_init() == noErr) stack = &mactcp; else +#endif stack = NULL; } @@ -140,7 +144,7 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only) return NULL; } -char *sk_addr_error(SockAddr addr) +const char *sk_addr_error(SockAddr addr) { if (stack != NULL) @@ -162,6 +166,14 @@ void sk_cleanup(void) stack->cleanup(); } +/* We should use Internet Config here. */ +int net_service_lookup(char *service) +{ + + return 0; +} + + /* * Local Variables: * c-file-style: "simon"