zsh-workers
 help / color / mirror / code / Atom feed
* Problems when building zsh 4.3.2 for Interix
@ 2007-03-15 11:10 Martin Koeppe
  2007-03-19 12:25 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Koeppe @ 2007-03-15 11:10 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: TEXT/PLAIN, Size: 477 bytes --]


Hi all,

I tried to build zsh 4.3.2 for Interix/SFU/Services for Unix 3.5. While 
building I encountered these problems:

1. Interix 3.5 doesn't #define XTABS.

2. Interix 3.5 has getrusage(), but not wait3(). This causes problems in 
signal.c/jobs.c, function update_process().

I made the changes attached, but then there are problems in printtime(). I 
think my changes are not optimal, either, as when there is getrusage(), it 
should be used.

Thanks for any help

Martin

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1187 bytes --]

diff -u zsh-4.3.2.orig/Src/zsh.h zsh-4.3.2/Src/zsh.h
--- zsh-4.3.2.orig/Src/zsh.h
+++ zsh-4.3.2/Src/zsh.h
@@ -788,7 +788,7 @@
 
 /* node in job process lists */
 
-#ifdef HAVE_GETRUSAGE
+#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
 typedef struct rusage child_times_t;
 #else
 typedef struct timeinfo child_times_t;
@@ -1702,7 +1702,9 @@
 #  ifdef OXTABS
 #define SGTABTYPE       OXTABS
 #  else
+#   ifdef XTABS
 #define SGTABTYPE       XTABS
+#   endif
 #  endif
 # endif
 
diff -u zsh-4.3.2.orig/Src/jobs.c zsh-4.3.2/Src/jobs.c
--- zsh-4.3.2.orig/Src/jobs.c
+++ zsh-4.3.2/Src/jobs.c
@@ -80,7 +80,7 @@
 /* shell timings */
  
 /**/
-#ifdef HAVE_GETRUSAGE
+#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
 /**/
 static struct rusage child_usage;
 /**/
@@ -263,7 +263,7 @@
 void 
 get_usage(void)
 {
-#ifdef HAVE_GETRUSAGE
+#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
     getrusage(RUSAGE_CHILDREN, &child_usage);
 #else
     times(&shtms);
@@ -271,7 +271,7 @@
 }
 
 
-#ifndef HAVE_GETRUSAGE
+#if !(defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE))
 /* Update status of process that we have just WAIT'ed for */
 
 /**/

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

* Re: Problems when building zsh 4.3.2 for Interix
  2007-03-15 11:10 Problems when building zsh 4.3.2 for Interix Martin Koeppe
@ 2007-03-19 12:25 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2007-03-19 12:25 UTC (permalink / raw)
  To: Martin Koeppe, zsh-workers

Martin Koeppe wrote:
> I tried to build zsh 4.3.2 for Interix/SFU/Services for Unix 3.5. While 
> building I encountered these problems:
> 
> 1. Interix 3.5 doesn't #define XTABS.

I've committed this bit.

> 2. Interix 3.5 has getrusage(), but not wait3(). This causes problems in 
> signal.c/jobs.c, function update_process().

This ought to be fixed by a patch from Wayne that's almost a year old:

2006-03-27  Wayne Davison  <wayned@users.sourceforge.net>

	* SF bug #1262954: Src/jobs.c: fixed a compilation problem
	when HAVE_GETRUSAGE is defined but HAVE_WAIT3 is not.

I'm hoping to produce a new version soon, but I'm struggling to fix some
stuff to do with quoting in completion, which is very hairy, so soon
may not be very soon.

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


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

end of thread, other threads:[~2007-03-19 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 11:10 Problems when building zsh 4.3.2 for Interix Martin Koeppe
2007-03-19 12:25 ` Peter Stephenson

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