Diff for /parser3/src/main/pa_socks.C between versions 1.9 and 1.18.2.5.2.1

version 1.9, 2001/12/28 14:06:52 version 1.18.2.5.2.1, 2003/03/19 16:28:09
Line 1 Line 1
 /**     @file  /**     @file
         Parser: socks initialization/finalization.          Parser: socks initialization/finalization.
   
         Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com)
         Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
   
         $Id$  
 */  */
   
   static const char* IDENT_SOCKS_C="$Date$";
   
 #define NO_UNISTD_H  #define NO_UNISTD_H
 #include "pa_config_includes.h"  #include "pa_config_includes.h"
   
   #ifdef WIN32
 #include "pa_exception.h"  #include "pa_exception.h"
 #include "pa_socks.h"  #include "pa_socks.h"
   #include "pa_string.h"
   
 #ifdef WIN32  // in cygwin: for pascal
 #include <winsock.h>  // in MSVC: for everything
 #else  #include <windows.h>
 //#include <netinet/tcp.h>  
 //#include <arpa/nameser.h>  #ifdef CYGWIN
 //#include <netdb.h>  // WSADATA
 //#include <signal.h>  #define WSADESCRIPTION_LEN      256
 #endif  #define WSASYS_STATUS_LEN       128
   typedef struct WSAData {
           WORD    wVersion;
           WORD    wHighVersion;
           char    szDescription[WSADESCRIPTION_LEN+1];
           char    szSystemStatus[WSASYS_STATUS_LEN+1];
           unsigned short  iMaxSockets;
           unsigned short  iMaxUdpDg;
           char *  lpVendorInfo;
   } WSADATA;
   typedef WSADATA *LPWSADATA;
   
   int PASCAL WSAStartup(WORD,LPWSADATA);
   int PASCAL WSACleanup(void);
 /* ************************ Common stuff *********************** */  #endif
   
 #ifdef WIN32  
   
 WSADATA wsaData;  WSADATA wsaData;
   
 void init_socks(Pool& pool) {  void pa_init_socks() {
         WORD wVersionRequested;          WORD wVersionRequested;
         int err;           int err; 
         wVersionRequested = MAKEWORD( 1, 1 );           wVersionRequested = MAKEWORD( 1, 1 ); 
Line 39  void init_socks(Pool& pool) { Line 49  void init_socks(Pool& pool) {
         if ( err != 0 ) {          if ( err != 0 ) {
             /* Tell the user that we could not find a usable */              /* Tell the user that we could not find a usable */
                 /* WinSock DLL.                                  */                      /* WinSock DLL.                                  */    
                 throw Exception(0, 0,                  throw Exception(0,
                         0,                          0,
                         "can not WSAStartup, err=%d",                           "can not WSAStartup, err=%d", 
                                 err);                                  err);
         }           } 
 }  }
   
 void done_socks() {  void pa_done_socks() {
         /* Confirm that the WinSock DLL supports 2.2.*/          /* Confirm that the WinSock DLL supports 2.2.*/
         /* Note that if the DLL supports versions greater    */          /* Note that if the DLL supports versions greater    */
         /* than 2.2 in addition to 2.2, it will still return */          /* than 2.2 in addition to 2.2, it will still return */
Line 61  void done_socks() { Line 71  void done_socks() {
   
 #else  #else
   
 void init_socks(Pool& pool) {}  void pa_init_socks() {}
 void done_socks() {}  void pa_done_socks() {}
   
 #endif  #endif

Removed from v.1.9  
changed lines
  Added in v.1.18.2.5.2.1


E-mail: