This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

question from new user re wsock32.dll + msvcrt.dll (and other stuff)



I'm really new to all this so if this is a dumb question, sorry.

I've tried to compile a command-line version of telnet that uses both
winsock and direct console I/O (_kbhit() & _getch()).  It compiles with
the MS compiler, but does not play well in the cygwin env (escape
sequences, for example, don't get interpreted but rather passed through
as DOS "funny chars", so I guess the whole cygwin I/O magic is
being bypassed, which sort of makes sense.  If I set CYGWIN=tty it
still doesn't behave totally correctly, but I haven't really worked this out
yet.
However, other things I do go belly up when I do this, so it isn't really
an option).

Anyway,  I tried to recompile it with GCC.  I defined Win32_Winsock and
linked with wsock32 (for sockets) and msvcrt (to get _kbhit and _getch).
It compiles, but gives a "Exception: STATUS_STACK_OVERFLOW" when
the dlls are loaded, before the program even runs.  I gather, from reading
the archives, that this can happen if two dlls try to initialize the same items.
Is this my problem?  If so, am I hosed?  I tried some of the workarounds
in the digest, like using "select()" to code my own "kbhit()".  But, try as
I might, I could not find a way to get a non-blocking read from STDIO to
simulate "_getch()".

Anyway, any enlightenment, including "give up, it's impossible" would be
helpful.

Thanks,

--arne

Arne Thormodsen
Hewlett-Packard Co.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com