open-watcom/open-watcom-v2 — pull request #107 by joncampbell123 (2014-10-28 01:04:04+00:00)
Title: Open Watcom "win32s" target can now be used to actually produce win32 binaries that run under Windows 3.1

Prior to this fix, you could compile for win32s but the executables would crash under Windows 3.1. It turns out Windows 3.1 does not return environment strings. It also seems the CLIB in Watcom was written without that consideration, which is why the NULL pointer dereference (and crash). It also seems Watcom's stack overflow check code doesn't work in Windows 3.1.

Separate C library files are generated for Win32s and NT. General Windows development should be done with the "nt" target if you don't care to support Windows 3.1, else, use the "win32s" target if you DO want your binary to run in Windows 3.1.