about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Modules/system.mdd3
-rw-r--r--configure.ac12
3 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bac574d7..12f1a78bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-10  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 22681: configure.ac, Src/Modules/system.mdd: pass all
+	files defining errnos to awk so that it finds them all on
+	systems where the list of definitions is fragmented.
+
 2006-09-07  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22672: arno: Functions/Prompts/prompt_clint_setup,
diff --git a/Src/Modules/system.mdd b/Src/Modules/system.mdd
index 51e96a46f..556f9f2ac 100644
--- a/Src/Modules/system.mdd
+++ b/Src/Modules/system.mdd
@@ -11,8 +11,9 @@ objects="system.o errnames.o"
 headers="errcount.h"
 
 :<<\Make
+# careful: ERRNO_H may contain a list
 errnames.c: errnames1.awk errnames2.awk $(dir_top)/config.h @ERRNO_H@
-	   if [ x@ERRNO_H@ = x ]; then \
+	   if [ x"@ERRNO_H@" = x ]; then \
 		touch errtmp.out; \
 	   else \
 		$(AWK) -f $(sdir)/errnames1.awk @ERRNO_H@ >errtmp.c; \
diff --git a/configure.ac b/configure.ac
index 21e7764e2..10d6528ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1320,24 +1320,24 @@ do
   dnl Try to make sure it doesn't get confused by files that don't
   dnl have real error definitions in.  Count definitions to make sure.
   dnl Definitions of error numbers have become more and more general, so
-  dnl pick the file with the most matches, which must be at least 7.
+  dnl make a list of files containing any definitions in and keep them all.
   dnl Careful with cut and paste in the pattern: the square brackets
   dnl must contain a space and a tab.
   nerrs=`test -f $ERRNO_TRY_H && \
   $EGREP '#[ 	]*define[ 	][ 	]*E[0-9A-Z]*[ 	]*(_HURD_ERRNO )?\(?[_A-Z0-9]' $ERRNO_TRY_H | \
   wc -l | sed 's/[ 	]//g'`
-  if test "x$nerrs" != x && test "$nerrs" -ge 7 && test "$nerrs" -gt "$lnerrs"
+  if test "x$nerrs" != x && test "$nerrs" -ge 1 && test "$nerrs" -gt "$lnerrs"
   then
     lnerrs=$nerrs
-    ERRNO_H=$ERRNO_TRY_H
+    ERRNO_H="$ERRNO_H $ERRNO_TRY_H"
   fi
 done
-if test x$ERRNO_H = x; then
+if test x"$ERRNO_H" = x; then
   AC_MSG_ERROR(ERROR MACROS NOT FOUND:  please report to developers)
 fi
-zsh_cv_path_errno_h=$ERRNO_H
+zsh_cv_path_errno_h="$ERRNO_H"
 ])
-ERRNO_H=$zsh_cv_path_errno_h
+ERRNO_H="$zsh_cv_path_errno_h"
 AC_SUBST(ERRNO_H)dnl
 
 dnl -----------------------------------------------------