Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh compiling on Apple OSX v. 10.4.x



Felix Rosencrantz wrote:
> It seems that on 10.4, it's better to use select() than poll() for the
> terminal IO. Otherwise you get the broken behavior Bill mentions
> Though configure for zsh hasn't been modified to know this.  I'm not
> sure how to modify the autoconfg code to change this code for 10.4.
> But it would be nice to fix this, so that zsh builds properly on OSX
> 10.4 w/o hand-edits to config.h.

I don't know what definitions to use, but this shouldn't break
anything.  I don't think autoconf allows you to undefine values; the
easiest way to fix it there would be to avoid testing for poll() and
poll.h at all on the appropriate systems.

Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.30
diff -u -r1.30 system.h
--- Src/system.h	24 Feb 2005 16:53:12 -0000	1.30
+++ Src/system.h	23 May 2005 13:41:18 -0000
@@ -300,6 +300,15 @@
 # include <sys/socket.h>
 #endif
 
+#if defined(__APPLE__) && defined(HAVE_SELECT)
+/*
+ * Prefer select() to poll() on MacOS X since poll() is known
+ * to be problematic in 10.4
+ */
+#undef HAVE_POLL
+#undef HAVE_POLL_H
+#endif
+
 #ifdef HAVE_SYS_FILIO_H
 # include <sys/filio.h>
 #endif

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author