[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] Is it possible to compile the game modules under Windows?
-> Well, I guess the subject line pretty much says it all. :)
->
-> I think I've read somewhere that the functions getpid() and unlink(), and
-> possibly also sleep(), are so-called "unix-isms", and as such Windows will
-> always choke on them. Is this correct? Is there any way I can get around
-> this, other than switching to Linux?
->
It might be the case that getpid and unlink and sleep doesn't exist on
your windows compiler.
You can probably find similiars functions in your compiler.
I think the cygwin package inclues a gcc-compiler enviroment for windows
and then you should be able to kind-of-emulate a linux on a window platform.
Or you can download the compiler djgpp.
But to make a true clone of the pbmserv for testing, I really think you need
some kind of unix machine, which can handle emails etc. the same way as
Richard's machine.
Anyway, here are some hints about the functions:
pid_t getpid(void):
DESCRIPTION
getpid returns the process ID of the current process.
(This is often used by routines that generate unique tem-
porary file names.)
int unlink(const char *pathname):
DESCRIPTION
unlink deletes a name from the filesystem. If that name
was the last link to a file and no processes have the file
open the file is deleted and the space it was using is
made available for reuse.
If the name was the last link to a file but any processes
still have the file open the file will remain in existence
until the last file descriptor referring to it is closed.
If the name referred to a symbolic link the link is
removed.
If the name referred to a socket, fifo or device the name
for it is removed but processes which have the object open
may continue to use it.
RETURN VALUE
On success, zero is returned. On error, -1 is returned,
and errno is set appropriately.
/Martin M. Pedersen
"chaz"