From: Chris Hanson Date: Sat, 25 Nov 2006 05:11:48 +0000 (+0000) Subject: Implement win32 socket shutdown support. X-Git-Tag: 20090517-FFI~833 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2234c7e62408d1a9cee47ee3e8d6c9ae428f5202;p=mit-scheme.git Implement win32 socket shutdown support. --- diff --git a/v7/src/microcode/ntapi.h b/v7/src/microcode/ntapi.h index c4c386296..4af78262d 100644 --- a/v7/src/microcode/ntapi.h +++ b/v7/src/microcode/ntapi.h @@ -1,8 +1,9 @@ /* -*-C-*- -$Id: ntapi.h,v 1.17 2004/12/20 04:36:44 cph Exp $ +$Id: ntapi.h,v 1.18 2006/11/25 05:11:43 cph Exp $ Copyright 1997,1999,2000,2002,2003,2004 Massachusetts Institute of Technology +Copyright 2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -92,6 +93,7 @@ enum syscall_names apicall_select, apicall_send, apicall_setsockopt, + apicall_shutdown, apicall_socket, /* C Library's unix-style procedures: */ @@ -954,6 +956,7 @@ static char * syscall_names_table [] = "send", "select", "set-socket-option", + "shutdown", "socket", /* C Library's unix-style procedures: */ diff --git a/v7/src/microcode/ntsock.c b/v7/src/microcode/ntsock.c index a49c2447a..e9d36fe19 100644 --- a/v7/src/microcode/ntsock.c +++ b/v7/src/microcode/ntsock.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntsock.c,v 1.19 2006/01/29 06:37:30 cph Exp $ +$Id: ntsock.c,v 1.20 2006/11/25 05:11:48 cph Exp $ Copyright 1997,1998,1999,2001,2002,2003 Massachusetts Institute of Technology Copyright 2006 Massachusetts Institute of Technology @@ -293,6 +293,15 @@ socket_channel_write (Tchannel channel, const void * buffer, return (n_written); } +void +OS_shutdown_socket (Tchannel channel, unsigned long how) +{ + VOID_SOCKET_CALL + (shutdown, + ((CHANNEL_SOCKET (channel)), + ((how == 1) ? SD_RECEIVE : (how == 2) ? SD_SEND : SD_BOTH))); +} + static void socket_channel_close (Tchannel channel, int errorp) {