Re: MSVC 5.0 Compile

From: Bil Simser (bil.simser@SHAW.WAVE.CA)
Date: 03/17/98


Touche. My mistake. I don't like having #ifdefs scattered about the code and
the question was for fixing the compile under Windows with MSVC 5. But
you're right. To maintain cross platform capabilities it should use the
CIRCLE_WINDOWS define. The #define stat _stat might work (although I'd use a
typedef instead). Thanks. I never considered the 'other' platforms (there
are other platforms? <g>)

-Bil

-----Original Message-----
From: Gary Barnett <gbarnett@POLARNET.COM>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Tuesday, March 17, 1998 7:15 PM
Subject: Re:  MSVC 5.0 Compile


>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 |
>     +------------------------------------------------------------+
>


     +------------------------------------------------------------+
     | 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