[Freeciv-Dev] Re: Patch: FreeCIV For OpenVMS...
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
-----BEGIN PGP SIGNED MESSAGE-----
>
>> --- 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.
>
Here's the problem with the above on OpenVMS.
The above is basically an "out" a way to exit without doing anything. In
OpenVMS the C compiler didn't like just going to a "goto" point that just
exits without an intervening step for some reason, hence the "null" of
";"
I "#if def" it just to be safe as I know it's O.k. on Unix platforms and
this was only an OpenVMS issue and I didn't want someone yelling about
how it broke something on the Unix side.
I'll be happy to remove this and just put the ";" in.
>
>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. */
>
Ya, I know, it was 4:00am in the morning when I discovered this.
>
>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...
>
I think I remeber some one discussing this in the past when I was working
on the OpenVMS port. I'll check but so far I don't think I have socklen_t
and that's why I did the above. I'll do some checking.
I found out what happened to the DIFF file I made for the OpenVMS patches
and I'm making a new one and I'll make sure this time it works :}
(It's a problem with the OpenVMS version of PIPES, I'm working on a
solution.)
+------------------+--------------------------+---------------+
| Robert Alan Byer | byer@xxxxxxxxxxxxxxxxxxx | ICQ #65926579 |
+------------------+--------------------------+---------------+
| Send an E-mail request to obtain a copy of my PGP key. |
+-------------------------------------------------------------+
| "It is by caffeine alone I set my mind in motion. It is by |
| cans of cola the thoughts aquire speed, the hands aquire |
| shakes, the shakes become a warning. It is by caffeine |
| alone I set my mind in motion." |
+-------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
iQEVAwUBOqVCHKVSqzlBVJbBAQHg5gf8CPdajbMXg46uHaDtWh6lKNhtdgUIyzfh
S6aFNN1wSWOOQgYGY9sCuwBFMYtOYNaa1iCtTVzrs1ClI361ooLBRelUulZwCS/l
un3uvRdMa7JTUNFMgiEKMnXLVP4KE0SFdNkQxN4KajR4NvtUvgoWaRYohsMjX1DP
i3m77dr+g5yYnvNZn7MgCH1PCguEICOtDGm8WPdSyAiE6AEHXEWklufR8udOpbFv
0MCM2vZ7vOeUJFoH0Dji6Nu5efldBjYQ88guj29FLd2REJCSzN/7PWoQYipWon8v
vZ17fSD+7GOOineUEm1YM8Ms0Ohk91HCWRa9tiwt5SRZw24eGL2uVQ==
=ILVT
-----END PGP SIGNATURE-----
|
|