This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Winsock call to UNIX
- To: "'Zhang, John'" <John dot Zhang at neonsoft dot com>, cygwin at sourceware dot cygnus dot com
- Subject: RE: Winsock call to UNIX
- From: Erik Hensema <erik dot hensema at group2000 dot nl>
- Date: Fri, 1 Oct 1999 08:41:40 +0200
> -----Original Message-----
> From: Zhang, John [mailto:John.Zhang@neonsoft.com]
>
> I installed Be 20.1, finished porting on NT 40. compiled with
> libwinsock32.a.
> Now the socket calls work fine on NT when a client and a
> server talking to
> each other.
> But when calling from NT to a UNIX (server or client),
> sockets never go
> thru, i.e. a ported application cannot talk to the original UNIX
> application.
Maybe a little/big endian issue? You cannot use constructions like this:
char *buf[SIZE];
int x;
/* read in the buffer here */
memcpy((void *)&x, buf+X_OFFSET, sizeof(int)); /* WRONG! */
You should use the htons() and htonl() functions on win32 in order to
correct the little/big endian problem.
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com