Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: Erik Hensema To: "'Zhang, John'" , cygwin AT sourceware DOT cygnus DOT com Subject: RE: Winsock call to UNIX Date: Fri, 1 Oct 1999 08:41:40 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Zhang, John [mailto:John DOT Zhang AT neonsoft DOT 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 AT sourceware DOT cygnus DOT com