🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Windows 98 to Linux porting

Started by
2 comments, last by Yanroy 24 years, 5 months ago
I am writing a MUD that uses winsoc32, but the server that is going to host it runs linux (I think redhat). They said that the same code should compile for linux. I was wondering if there was anything special I need to do in order to port my windows code. www.trak.to/rdp

Yanroy@usa.com

--------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor

Yanroy@usa.com

Advertisement
If use any function that starts with WSA then you can''t use it in Linux. i.e. You need to turn functions like WSAEventSelect and WSAAsyncSelect into straight select statements. In other words it will only transfer transparently if you only use POSIX functions and Berkeley socket functions.
I''ve just finished porting my socket code to Linux just a couple days ago. The only real differences where no WSAStartup or WSACleanup. I did have some trouble using select() though, so I switched to poll().

The thing is, I didn''t use any windows socket classes like CSocket. Wrote my own. Now porting is a snap.
There ya go! never write anything that has the dirty stink of "Microsoft Specific", and your code is bound to be more portable! Window management aside, of course.




*oof*
*oof*

This topic is closed to new replies.

Advertisement