I'm beginning to make my Windowing library work in Linux as well as Windows via the X library, but I have hit a small snag that I believe I know the answer to, but need confirmation on. I declare my own types in a header file which are defined as a plain Windows or X type based on which OS is detected so that users may write code with my types and then have the code compile on both platforms with no changes beyond "main()" and "WinMain()". My problem is figuring out what is defined in Windows as opposed to Linux to setup my types properly.
#ifdef WINDOWS
...
#endif
#ifdef LINUX
...
#endif
Are those the correct definitions to look for, or am I off base here? I've not really worked on a project that compiles on both platforms before and as such have never had the need to figure out what OS I am compiling on. It was always "this program is Windows only" or "this server application is Linux only". Now it's time to bridge the gap and it's been fun thus far! Thanks for the help.
-
Sephiroth