/[gcl]/gcl/o/mingwin.c
ViewVC logotype

Diff of /gcl/o/mingwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mjthomas, Mon Sep 23 14:02:10 2002 UTC revision 1.5 by mjthomas, Tue Sep 24 03:08:33 2002 UTC
# Line 5  Line 5 
5  #include "windows.h"  #include "windows.h"
6  #include "errno.h"  #include "errno.h"
7  #include "signal.h"  #include "signal.h"
8    #include "stdlib.h"
9    
10  #ifdef DODEBUG  #ifdef DODEBUG
11  #define dprintf(s,arg) \  #define dprintf(s,arg) \
# Line 111  static void close_winsock(); Line 112  static void close_winsock();
112  static void  static void
113  InitSockets()  InitSockets()
114  {  {
     DWORD id;  
115      WSADATA wsaData;      WSADATA wsaData;
116      static int initialized;      static int initialized;
117      if (! initialized) {      if (! initialized) {
# Line 418  CreateSocket(port, host, server, myaddr, Line 418  CreateSocket(port, host, server, myaddr,
418                                           * in progress. */                                           * in progress. */
419      struct sockaddr_in sockaddr;        /* Socket address */      struct sockaddr_in sockaddr;        /* Socket address */
420      struct sockaddr_in mysockaddr;      /* Socket address for client */      struct sockaddr_in mysockaddr;      /* Socket address for client */
421      SOCKET sock;      SOCKET sock = 0;
422    
423      /*      /*
424       * Check that WinSock is initialized; do not call it if not, to       * Check that WinSock is initialized; do not call it if not, to
# Line 612  TcpOutputProc ( int fd, char *buf, int t Line 612  TcpOutputProc ( int fd, char *buf, int t
612          {   fd_set writefds;          {   fd_set writefds;
613          int res;          int res;
614              struct timeval timeout;              struct timeval timeout;
             int err;  
615                FD_ZERO(&writefds);                FD_ZERO(&writefds);
616                FD_SET(fd,&writefds);                FD_SET(fd,&writefds);
617                timeout.tv_sec = (block == 0 ?  0 : 60*60*24*30);                timeout.tv_sec = (block == 0 ?  0 : 60*60*24*30);
# Line 677  TcpOutputProc ( int fd, char *buf, int t Line 676  TcpOutputProc ( int fd, char *buf, int t
676    Side Effects:  The buffer may be filled, and the fill pointer    Side Effects:  The buffer may be filled, and the fill pointer
677    of the buffer may be changed.    of the buffer may be changed.
678   */   */
679  getCharGclSocket(strm,block)  int getCharGclSocket(strm,block)
680    object strm;    object strm;
681    object block;    object block;
682  {  {
# Line 766  sigint() Line 765  sigint()
765  }  }
766  */  */
767    
768    #if 0
769  BOOL WINAPI inthandler(DWORD i)  BOOL WINAPI inthandler(DWORD i)
770  {  {
771    fprintf(stderr,"in handler %d",i);    fprintf(stderr,"in handler %d",i);
772        fflush(stderr);        fflush(stderr);
773    terminal_interrupt(1);    terminal_interrupt(1);
774      return TRUE;
775  }  }
776    #endif
777    
778    
779  void  void
780  alarm(int n) {  alarm(int n) {
   /* printf("dummy alarm"); */  
781    return;    return;
782  }  }
783    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26