I've just spent an hour or so tracking down a bug in tobruk (actually,
MSGAPI38), and I traced it down to this code in api_sdm.c:
#ifdef OS_2
{
#ifndef __BORLANDC__
extern void far pascal DosSleep(dword);
if((mn % 128)==127)
DosSleep(1L);
#else
/* extern void sleep(unsigned); */
if ((mn % 128)==127)
sleep(1);
#endif
}
#endif
The DosSleep(1L) call, under Watcom, is pushing something 1 onto the stack,
and then not adding 4 to the stack after the call. If there is a *proper*
OS/2 prototype, ie #define INCL_DOS, #include , it generates
the proper code (at least in my test program). It is obviously quite
stupid declaring your own shitty prototype for something that you shouldn't
be. I might be able to fix it by including os2.h (but I have bad memories
of trying things like that before), but I can't see any reason for the
code!
I am therefore going to delete the code. If you have any technical reason
why I shouldn't do so, please let me know. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|