Re: Borland C++ Request

From: Dan Egli (dan@mudhosts.net)
Date: 01/13/99


On Tue, 12 Jan 1999, George wrote:

> It seems a newer version of Borland C++ includes winsock2.h automatically
> which conflicts with the winsock.h included by CircleMUD.  Is there any
> #define we can use to detect Winsock2 and avoid including the old Winsock
> code?

I'd check for a define made in the winsock2.h file, and call an #ifdef on
it. Example: Suppose there's a statement in winsock2.h:
#define WINSOCK_VER 2.1

you can call it one of 2 ways. If you KNOW that WINSOCK_VER is not there
unless defined in winsock.h or winsock2.h, do:
#ifndef WINSOCK_VER
#include <winsock.h>
#endif

Else, if WINSOCK_VER is always there, then check it's value:

#if WINSOCK_VER != 2.1
#include <winsock.h>
#endif

Get the idea? :>


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST