mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
22681: find all error number definitions
This commit is contained in:
parent
07a1121203
commit
638b0da970
3 changed files with 14 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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; \
|
||||
|
|
12
configure.ac
12
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 -----------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue