Mail Archives: cygwin/1996/12/10/20:28:54
Hi,
I noticed a few problems with the latest release.
First it appears the previous version would allow me to
do:
cp foo /dir
even if the file foo was actually "foo.exe" but the
current version does not allow this. Is there a
reason for this?
Second I haven't been able to get sockets working.
Do I have to link against a certain lib? I'm
using NT and the following src file:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
main() {
struct sockaddr_in ad;
int s;
char c;
memset(&ad, 0, sizeof(ad));
ad.sin_family = AF_INET;
ad.sin_port = htons(79);
ad.sin_addr.s_addr = inet_addr("192.12.69.30");
s = socket(AF_INET, SOCK_STREAM, 0);
if(s == -1) {
perror("socket");
exit(1);
}
if(connect(s, &ad, sizeof(ad)) == -1) {
perror("connect");
exit(1);
}
while(read(s, &c, 1) == 1) {
write(1, &c, 1);
}
printf("---- done\n");
close(s);
}
This blocks on the connect and never returns.
Third how do I figure out the top of stack? Can
I just take the address of a variable and main
and round up to an even multiple of 0x10000? Will
this work on win95 as well as NT (it appears to work
for NT for me right now).
Fourth I attempted to catch SIGSEGV and then generate
a signal (trying to find the top of stack) and
I noticed that my signal handler never ran but
the exception conditions were printed. How much
of the signal stuff is implemented?
And a complaint: uname returns a system name with
a "/" symbol in it. This is troublesome if you
generate filenames using the output of uname.
Thanks for a great product. It has saved me an
enormous amount of time having a unix environment
in NT.
Tim N.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -