--- parser3/src/lib/smtp/comms.C 2004/07/28 14:38:20 1.6 +++ parser3/src/lib/smtp/comms.C 2026/04/25 13:38:46 1.16 @@ -1,14 +1,14 @@ /** @file Parser: SMTP sender impl. - Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ -static const char * const IDENT_COMMS_C="$Date: 2004/07/28 14:38:20 $"; - #include "smtp.h" +volatile const char * IDENT_COMMS_C="$Id: comms.C,v 1.16 2026/04/25 13:38:46 moko Exp $"; + // --------------------------------------------------------------------------- int SMTP:: IsAddressARawIpaddress(const char* string) @@ -54,7 +54,7 @@ ResolveService(const char* service, u_sh *our_port = serventry->s_port; else { -#ifdef WIN32 +#ifdef _MSC_VER int retval = WSAGetLastError(); if( (retval == WSANO_DATA) || (retval == WSANO_RECOVERY) ) { @@ -107,15 +107,10 @@ GetAndSetTheSocket(SOCKET *the_socket) return WSAESOCKTNOSUPPORT; } -#ifdef SO_DONTLINGER - int dont_linger = 0; - setsockopt(*the_socket, SOL_SOCKET, SO_DONTLINGER, (const char *)&dont_linger, sizeof(dont_linger)); -#else // To enable SO_DONTLINGER (that is, disable SO_LINGER) // l_onoff should be set to zero and setsockopt should be called linger dont_linger={0,0}; setsockopt(*the_socket, SOL_SOCKET, SO_LINGER, (const char *)&dont_linger, sizeof(dont_linger)); -#endif return 0; } @@ -153,7 +148,7 @@ GetConnection(SOCKET the_socket, struct void SMTP:: MiscSocketSetup(SOCKET soc, fd_set *fds, struct timeval *timeout) { -#ifdef FIONBIO +#ifdef _MSC_VER unsigned long ioctl_blocking = 1; ioctlsocket(soc, FIONBIO, &ioctl_blocking); #endif