* PATCH: zftp with Digital Unix
@ 1998-12-16 12:37 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1998-12-16 12:37 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-12-16 12:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-16 12:37 PATCH: zftp with Digital Unix Sven Wischnowsky
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).