PSA:
If you're trying to write a utility using Open Watcom C/C++ that works both on DOS and on the Linux machine you normally cross-compile from, and you're getting mysterious misbehaviours on one platform, check your INCLUDE path.
Having INCLUDE=$WATCOM/lh when cross-building for DOS or having INCLUDE=$WATCOM/h when building natively for Linux can result in successfull builds with confusing runtime misbehaviours.