Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: Patch: FreeCIV For OpenVMS...
Home

[Freeciv-Dev] Re: Patch: FreeCIV For OpenVMS...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Robert Alan Byer <byer@xxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Patch: FreeCIV For OpenVMS...
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: 06 Mar 2001 15:27:46 +0000

On Mon, 5 Mar 2001, byer@xxxxxxxxxxxxxxxxxxx wrote:

>>> I have uploaded a large diff file named "openvms_freecif.diff"
>>> that includes updated compile scripts, minor code changes to make
>>> the current snapshot work under OpenVMS.
>>
>>For some reason, it appears that every newline character has
>>"doubled", i.e. there are two newlines where you would expect one.
>>(I checked, and it's actually two newlines, not a CR/LF pair.)
> 
> I was afraid that would happen to the ASCII file.
> 
> I TAR'd it up and uploaded it to the "incoming" directory as
> "openvms_freeciv_diff.tar"
> 
> Let me know if there is a problem with it and I'll work something
> else out.

> --- packhand.c        2001/02/19 22:52:33     1.165
> +++ packhand.c        2001/03/05 15:27:35
> @@ -256,6 +256,14 @@
>        Refresh a random place to clear the intro gfx. */
>        center_tile_mapcanvas(map.xsize/2, map.ysize/2);
>      OUT: /* do nothing */
> +
> +/*
> + *  OpenVMS Needs A Null Here.
> + */
> +#   if defined(__VMS)
> +      ;
> +#   endif
> +
>      }

What does `OpenVMS Needs A Null Here' mean?  Is this because the
compiler gives up if it has a label without a statement following it?
If so, I don't think there's any need to use an ifdef since it doesn't
do any harm on non-VMS platforms.

Also, I think that you should write your comments in the same style as
the rest of Freeciv (well, most of the well-written parts anyway...): 

  /* OpenVMS needs a null here.  */

Also, the statement seems a bit cryptic; at least I can only guess at
what it means.

I'm not sure if I read this correctly.

> @@ -560,7 +567,13 @@
>  ********************************************************************/
>  static int server_accept_connection(int sockfd)
>  {
> -  int fromlen;
> +
> +# if defined(__VMS) && !defined(_DECC_V4_SOURCE)
> +    size_t fromlen;
> +# else
> +    int fromlen;
> +#endif 
> +
>    int new_sock;
>    struct sockaddr_in fromend;
>    struct hostent *from;

I think that the right thing to do here is to use socklen_t, and then
fall back to int if this is not available.  Does VMS have socklen_t?
It should...

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
Either CONFESS now or we go to ``PEOPLE'S COURT''!!



[Prev in Thread] Current Thread [Next in Thread]