So a while back I wrote a miniature debugger to try and familiarize myself with the Windows debugging API. I got my debugger finished quite a while back but I've hit a recent snag that I have had racking my brain for a while. I'm trying to get my code to work properly under open watcom. The program compiles fine but it ALWAYS gives me an error whenever the actual logging thread is created in the program. I refrained from my usual 'don't use threads' policy in this manner because I wanted users to have the option to monitor processes, etc. etc..
Either way, whenever I compile the program under Open Watcom (which it compiles flawlessly,) the debugging thread checks the passed parameter to make sure that the proper flag is set. It always returns 0x00000004 though, which is an 'unrecongized' flag for the thread functions parameter in the struct.
I'm probably not making sense here, so I'll shorten it and then post the code: when you specify to debug an active process or a new one it sets a flag which is then given to the thread function and checks that parameter, but in Open watcom it's always wrong while in, say, GCC it's correct. I'll pastebin it and highlight the (what I think are) relevent sections.
Any help? I'm obviously not used to strict compilers and I've pulled every single trick I can think of, but to no avail. I don't have to get this to work on Open Watcom, I just feel if I can other people won't have a problem if they wish to compile my apps by source.