PDA

View Full Version : Mutex declaration for Linux


misanthropicfnd
02-09-2002, 11:56 AM
I figured out how to get rid of the static instantiation of the mutexes using pthreads.

For pthread.h to define the necessary symbols _GNU_SOURCE needs to be declared. Probably easiest to add -D_GNU_SOURCE to the COPTS in the makefiles. While editing the makefiles adding -DLUCLIN is also a good idea.

Then, the code commented out above the current static assignment can be uncommented, and the static initialization can be removed.

While unclear if it has any beneficial effects, the world server still works properly (as properly as I've seen it work on linux that is) after these changes and a few others I had to made to get it to build.

Attached is the code & makefile from world as an example of the changes to the makefile & code. They also include a few of the other changes I've made. It also appears that console.cpp wasn't initializing the mutex referenced throughout the code so that change is in here as well.

Hope this is useful...

misanthropicfnd
02-09-2002, 02:15 PM
If somemone wants to try building the rest of 0.2.2 on linux, I've attached the remaining zips. I had to split them up to stay under the file size limit. Unzip them all in the same directory & give it a try. With any luck it might even work.

misanthropicfnd
02-09-2002, 02:16 PM
And now for zone...

misanthropicfnd
02-09-2002, 02:17 PM
...