Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Problems when building zsh 4.3.2 for Interix
- X-seq: zsh-workers 23221
- From: Martin Koeppe <mkoeppe@xxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Problems when building zsh 4.3.2 for Interix
- Date: Thu, 15 Mar 2007 12:10:19 +0100 (CET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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
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 */
/**/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author