Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Server hangs on an Alpha
Home

Re: [Freeciv-Dev] Server hangs on an Alpha

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: matthew@xxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, brunel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Server hangs on an Alpha
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 1 Aug 1999 22:27:25 +1000 (EST)

Matthew OConnor <matthew@xxxxxxxxxxxxxx> wrote:

> I changed the myrand(int size) to myrand(RANDOM_TYPE size) and
> recompiled.  The problem was still present.  I then changed the
> RANDOM_TYPE typedef from "unsigned int" to "unsigned long int" and the
> now the server doesn't hang anymore.

This may be useful information, but I don't like it as a 
general fix.  The random number generation is intended to 
be platform independent (so ideally you could use the same 
seeds on different platforms and get the same results), and
potentially the above change could make that not the case. (?)

I think the real problem is probably be elsewhere, (presumably
mapgen rather than myrand), so I'd prefer to find that.

I wonder what happens if you change all the longs in mapgen to 
be just ordinary ints, since they're really both just 32-both 
ints on most platforms freeciv is run on.

Regards,
-- David

[Prev in Thread] Current Thread [Next in Thread]
  • Re: [Freeciv-Dev] Server hangs on an Alpha, David Pfitzner <=