From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17039 invoked from network); 16 Dec 1998 12:42:51 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Dec 1998 12:42:51 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id HAA07549; Wed, 16 Dec 1998 07:39:17 -0500 (EST) Resent-Date: Wed, 16 Dec 1998 07:39:17 -0500 (EST) Date: Wed, 16 Dec 1998 13:37:33 +0100 (MET) Message-Id: <199812161237.NAA02781@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu Subject: PATCH: zftp with Digital Unix Resent-Message-ID: <"RIszh3.0.ur1.rdwTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4821 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello On big endian machines ntohs() and such are no-ops but for those of us who have to use little-endians they become important... The patch below makes zftp work with Digital Unix on Alphas. The port is already reported in network order by getservbyname(). This shouldn't break anything on other machines. If it does we will need some `#if's. Bye Sven P.S.: Nice module, Peter. *** os/Modules/zftp.c Wed Dec 16 11:48:36 1998 --- Src/Modules/zftp.c Wed Dec 16 13:27:53 1998 *************** *** 1650,1656 **** zfsetparam("ZFTP_HOST", ztrdup(zhostp->h_name), ZFPM_READONLY); } ! zsock.sin_port = ntohs(zservp->s_port); zcfd = zfmovefd(socket(zsock.sin_family, SOCK_STREAM, 0)); if (zcfd < 0) { zwarnnam(name, "socket failed: %e", NULL, errno); --- 1650,1656 ---- zfsetparam("ZFTP_HOST", ztrdup(zhostp->h_name), ZFPM_READONLY); } ! zsock.sin_port = zservp->s_port; zcfd = zfmovefd(socket(zsock.sin_family, SOCK_STREAM, 0)); if (zcfd < 0) { zwarnnam(name, "socket failed: %e", NULL, errno); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de