This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Win32s/mingw32


>   vtailor@gte.net
>   Thu, 23 Apr 1998 21:21:02 -0500 (CDT)
>   
>>   Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
>>   23 Apr 1998 11:09:18 +0200
>>Gunther Ebert  writes:
>>>
>>> win32s doesn't support Win32 console programs. GUI programs that
>>> were built with the mingw32 compiler should work fine if they don't
>>> use anything that Win32s doesn't support (like multiple threads,
>>> console). Look into the Win32 API docs to see which Win32 functions
>>> are supported by Win32s and which are not.
>>> I don't believe that the mingw32 compiler produces a wrong exe format,
>>> the programs do even run under Windows95 :-)
>
>win32s is still a 16-bit executable system, and the code for generating
>loads and stores is different than under MINGW32 or CYGWIN32.  I'd be
>surprised if you could get any kind of a gcc program to load under
>win32s.
>>
This is to forestall a response to this mailing list in the form of an
email reply that I received from p.dalgaard.

Win32s is just an extension of Windows 3.1 and uses the same executable
format, which is an extension of the Dos executable format and uses
16-bit registers to form a 32-bit address, something that will cause an
immediate exception if it appears within a `flat-model' program for
Windows 95/NT.

Windows 95/NT programs use a set of registers that was added to the Intel
CPU architecture after the Windows 3.0 and 3.1 series was designed. These
registers are not used for Windows 3.0 and 3.1 programs.  Hence, the
incompatibility.

To get Windows 3.1 executables from gcc, you have to change code-
generation templates to generate the earlier non-flat-model code.

>>#include
>>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
>>LPSTR lpCmdLine, int nCmdShow)
>>{
>>        MessageBox (NULL, "Hello Win32", "First App", MB_OK);
>>return 0;
>>}

In case you look at the Wine distribution, you'll find the above program
that I sent in when we were testing first versions of libwine.so over a
year ago.
>>
>>the RSXNT executable runs under WINE on Linux, but the mingw32 one
>>dies with
>>
>>No handler for Win32 routine CRTDLL.107: _fpreset (called from 00401055)
>>
>That just means that Wine has a built-in crtdll.dll emulation, and
>someone forgot to include a stub for _fpreset.  If you go to the Wine
>source code and add such a stub, and there are no other problems, then
>you ought to get mingw32 programs to load and run.
>

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]