zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: PATCH: zftp with Digital Unix
Date: Wed, 16 Dec 1998 13:37:33 +0100 (MET)	[thread overview]
Message-ID: <199812161237.NAA02781@beta.informatik.hu-berlin.de> (raw)


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


                 reply	other threads:[~1998-12-16 12:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199812161237.NAA02781@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).