This is the mail archive of the
mailing list for the Cygwin project.
libc and building cygwin32.dll
- To: gnu-win32 at cygnus dot com
- Subject: libc and building cygwin32.dll
- From: Benoit Papillault <papilla at cs dot tamu dot edu>
- Date: Mon, 1 Jun 1998 02:27:17 -0500 (CDT)
I am trying to write a tiny telnet daemon. It's rather simple under Unix
even if you have to learn how to create a master tty device. I have tried
to recompiled my unix source code under Windows 95 using cygwin32b19. In
this case, I have used bash as shell. The redirections works! I mean,
everything sent by bash is received by the telnet client and vice-versa.
However, it works in line discipline mode (as we said in the unix world!)
and bash doesn't seems to understand my commands (he just say: error 22).
With command.com, it's worse, it's like there is no redirections at all.
So, I have thought that this too simple code will never compiled. I have
already programmed under Windows (both NT3.51, NT4.0, 95, 3.1). I have
even made a tool (nslookup like) that works both under 96,NT and Unix.
So, I have tried to rewritte my code from scratch. For sockets, I use
Winsocks, I can use select() and ioctlsocket(FIONBIO) to get data as soon
as they are received. So, for the networks part, it works.
Now for the redirection part. I have searched the Micro$oft web server and
found many documentations. I have tried the sample using SetStdHandle,
GetStdHandle, DuplicateHandle, CreatePipe and CreateProcess. It use two
anonymous pipe to make the redirection. ok. But you can't read and write
on both pipes at the same time. The overlapped operations are not
supported. Named pipes are not supported under Windows 95. And finally,
thread seams incompatible with cygwin32 (yeah, I have tried to weird thing
which consists to create two threads, one for each direction! although
it's pretty simple to read on many file descriptors at the same under
So, I have thought to another solutions: not using cygwin32.dll but just
Win32 API. Not tested yet. But for further development, It could be
interested to have a libc WITHOUT all the unix enulation made by
cygwin32.dll. I have a look at mingwin32 (which uses CRTDLL from
Micro$oft, Am I right?).
Here is the question: Is there a libc (source code form obviously)
available under Win32?
Just to do my printf() and malloc() as usual. If nothing available, I am
ready to write one (but a smal one, just with all the fprintf(), fopen(),
... , malloc(), free(), strdup() functions. But I prefer to ask before
wasting my time.
For help on using this list (especially unsubscribing), send a message to
"email@example.com" with one line of text: "help".