lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Re: _WINDOWS patch for doing NSL_FORK


From: afn06760
Subject: LYNX-DEV Re: _WINDOWS patch for doing NSL_FORK
Date: Fri, 13 Mar 1998 18:26:33 GMT

>     * From: address@hidden
>     * Date: Fri, 13 Mar 1998 06:16:10 GMT
>
>The following is a test program compiled with MINGW32 gcc2.8 to
>demonstrate a simple, but effective, use of subthreads to implement
>NSL_FORK for _WINDOWS in HTTCP.c.  Note that the text at the bottom
>of this note is copied from a Dos window while running Windows 95 and
>after connecting to an internet server.  Note also how the selective
>use of global variables simplifies the code.
>
>======================================================================
>socktest.c:
>======================================================================

I got a recent pre-release version of lynx to compile as a pure Windows
app using cygwin to configure and make it with the MINGW32 specs.  The
_fork_func version in socktest.c works like a charm, with no apparent
rough edges.  If you have been having problems with CloseHandle under
Borland, then I suggest that you try the pure Windows `CreateThread'
in place of _beginthread (which the textbooks recommend for console
applications).  At lease CreateThread will give you a valid Borland
handle.  I think the MINGW32 version of _beginthread, which is based
on Microsoft's crtdll.dll, rather than Borland's rtldll.dll, is a more
nearly correct implementation.

I have also criticized the cygwin b19.1 release, but it _does_ compile
a working and stable Unix-style version of lynx that does all the right
things (with a little help) under Windows 95.  The _WINDOWS version of
lynx generated by MINGW32 shows great promise, but still has some rough
edges, particularly in passing temporary text files to be edited during
a `mailto:address@hidden' session.  In this case, notepad.exe is looking
at a Unix-style text file with no `\r' that mysteriously gets generated
by the pure Windows version of lynx.

Otherwise, what can I say, using _beginthread with crtdll.dll and lynx
is unbelievably smooth and effective.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]