zsh-workers
 help / color / mirror / code / Atom feed
* zftp module problem
@ 1999-04-30 10:12 Bart Schaefer
  1999-04-30 11:16 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1999-04-30 10:12 UTC (permalink / raw)
  To: zsh-workers

I'm just rebuilding a dynamic zsh 3.1.5-pws-XX for the first time in quite
a while, and I just ran into a compilation problem with zftp.c:

../../../zsh-3.1.5/Src/Modules/zftp.c: In function `zftp_test':
../../../zsh-3.1.5/Src/Modules/zftp.c:2071: storage size of `pfd' isn't known
../../../zsh-3.1.5/Src/Modules/zftp.c:2086: `POLLNORM' undeclared (first use this function)

My system (Linux, RedHat 4.2, libc5, yes I know it's old) HAS_POLL and
HAS_SELECT but does not have struct pollfd, POLLIN, or POLLNORM defined.

The following is a rather brute-force correction.

Index: Src/Modules/zftp.c
===================================================================
diff -u -r1.5 zftp.c
--- zftp.c	1999/03/29 21:46:03	1.5
+++ zftp.c	1999/04/30 10:08:54
@@ -2067,7 +2067,7 @@
 {
 #if defined(HAVE_POLL) || defined(HAVE_SELECT)
     int ret;
-# ifdef HAVE_POLL
+# if defined(HAVE_POLL) && (defined(POLLIN) || defined(POLLNORM))
     struct pollfd pfd;
 # else
     fd_set f;
@@ -2077,7 +2077,7 @@
     if (zcfd == -1)
 	return 1;
 
-# ifdef HAVE_POLL
+# if defined(HAVE_POLL) && (defined(POLLIN) || defined(POLLNORM))
 #  ifndef POLLIN
     /* safety first, though I think POLLIN is more common */
 #   define POLLIN POLLNORM

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-04-30 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-30 10:12 zftp module problem Bart Schaefer
1999-04-30 11:16 ` Peter Stephenson
1999-04-30 17:18   ` Bart Schaefer

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).