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

signames.h broken under Linux 1.3.0 and later



As of Linux kernel release 1.3.0, the machine-dependent signal
macro definitions were moved from /usr/include/linux/signal.h to
/usr/include/asm/signal.h, where asm is actually a link to the
appropriate architecture's subdirectory (named asm-alpha, asm-i386,
asm-m68k and so on). 

If compiled right away, zsh does have funny hangs in strlen() -
I discovered this with a debugger -, because printjobs() in jobs.c
doesn't guard against out-of-bounds access to the sigmsg[] array.

Maybe there is some relation to the signalling problems reported
under HP-UX and other OS. Can someone experiencing these problems
confirm that signames.h was generated properly?

Anyway, the fix for configure.in is included below. I added the
grep test because the file /usr/include/asm/signal.h did exist
under older Linux releases too.

This is for zsh-2.6-beta10.


*** configure.in.orig	Sat Jul  1 00:05:02 1995
--- configure.in	Tue Jul 11 16:57:34 1995
***************
*** 355,365 ****
  dnl Where is <signal.h> located?  Needed as input for signals.awk
  AC_MSG_CHECKING(where signal.h is located)
  for SIGNAL_H in /usr/include/bsd/sys/signal.h   dnl Next
!                 /usr/include/linux/signal.h     dnl Linux
                  /usr/include/sys/signal.h       dnl Almost everybody else
                  /dev/null;                      dnl Just in case we fall through
  do
!   test -f $SIGNAL_H && break
  done
  AC_MSG_RESULT($SIGNAL_H)
  AC_SUBST(SIGNAL_H)dnl
--- 355,368 ----
  dnl Where is <signal.h> located?  Needed as input for signals.awk
  AC_MSG_CHECKING(where signal.h is located)
  for SIGNAL_H in /usr/include/bsd/sys/signal.h   dnl Next
!                 /usr/include/asm/signal.h       dnl Linux 1.3.0 and above
!                 /usr/include/linux/signal.h     dnl Linux up to 1.2.11
                  /usr/include/sys/signal.h       dnl Almost everybody else
                  /dev/null;                      dnl Just in case we fall through
  do
!   test -f $SIGNAL_H && \
!   grep -q '#[ 	]*define[ 	][ 	]*SIG[0-9A-Z]*[ 	]*[0-9][0-9]*' $SIGNAL_H && \
!   break
  done
  AC_MSG_RESULT($SIGNAL_H)
  AC_SUBST(SIGNAL_H)dnl

-- 
Thorsten Meinecke
<kaefer@xxxxxxxxxxxxxxx>



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