Re: [Freeciv-Dev] Code Questions
[Top] [All Lists]
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
Andy Black wrote:
> I have a few questions about some files that are generating errors in the
> server code for the mac compile.
> 
> What is the purpose of void myusleep(unsigned long usec) in
> common/shared.c, what are the units of time used, what is the variable that
> is passed in used for?
This function is to provide the function "usleep" which is
available on some but not all platforms.  My usleep manual page 
says:
       The  usleep()  function  suspends execution of the calling
       process for usec microseconds.  The sleep may  be  length-
       ened  slightly by any system activity or by the time spent
       processing the call.
> Why is sys/time.h needed in mapgen.c?
I think it isn't needed.  (Maybe it once was, or someone just 
copied headers from somewhere else.)
> Why is sys/types.h needed?
It seems to be needed for select() (networking stuff, also to
fake usleep if necessary), maybe other stuff as well.
Regards,
-- David
 
 
 | 
 |