Re: MSVC 5.0 Compile

From: Gary Barnett (gbarnett@POLARNET.COM)
Date: 03/17/98


>Bil Simser <bil.simser@SHAW.WAVE.CA> said:

>I've successfully compiled Circle under MSVC 5. Here's how you correctly
get
>rid of the problem:
>
The only reason I'm nitpicking is cause you said 'correctly.' :-)
<snip>
>In act.other.c line 728:
>
>change:
>struct stat fbuf ;
>to:
>struct _stat fbuf ;
>
<snip>

Where's the ifdef CIRCLE_WINDOWS?

how about:

#ifdef CIRCLE_WINDOWS
 struct _stat fbuf;
#else
  struct stat fbuf;
#endif

#ifdef CIRCLE_WINDOWS
  if (stat(filename, &fbuf) < 0) {
#else
  if (_stat(filename, &fbuf) < 0) {
#endif

You never know when you'll have to switch your OS. Maybe years from now
you'll give up the mud and hand if off to the next guy, if nothing else, and
maybe he'll try to run it on an ancient SGI machine or even a (then really
ancient) 486 running linux :-)

Maybe you could do this, but I'm not sure there wouldn't be fallout in some
other place as a result.

#ifdef CIRCLE_WINDOWS
  #define stat _stat
#endif

--Mallory


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



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