This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for fixinc to fix Solaris2 hosted cross compiler build failure


Jim Wilson wrote:
> 
> [[analysis of brokenness in Solaris Bourne shell]]
> 
> This can be fixed by testing for the directory before trying to cd into it.
> I propose the following patch to fix this problem.
> 
> Wed Jan 19 20:39:17 2000  Jim Wilson  <wilson@cygnus.com>
> 
>         * fixinc/inclhack.tpl: Test for directory before trying to cd into it.
>         * fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate.

Looks good.  Just a nit about the comment:  I don't like
dinkleberries in code; even comments.  I rewrote the
"This originally used" comment below.  I will apply this
Saturday, unless you beat me to it.

> Index: inclhack.tpl
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.tpl,v
> retrieving revision 1.14
> diff -p -r1.14 inclhack.tpl
> *** inclhack.tpl        1999/12/29 22:58:06     1.14
> --- inclhack.tpl        2000/01/20 04:45:47
> *************** for INPUT in ${INPUTLIST} ; do
> *** 135,141 ****
> 
>   cd ${ORIGDIR}
> 
> ! cd ${INPUT} || continue
>   INPUT=`${PWDCMD}`
> 
>   #
> --- 135,146 ----
> 
>   cd ${ORIGDIR}
> 
> ! # This originally used cd || continue, however, that does not work with the
> ! # Solaris2 /bin/sh.

#  Make sure a directory exists before changing into it,
#  otherwise Solaris2 will fail-exit the script.
#

> ! if [ ! -d ${INPUT} ]; then
> !   continue
> ! fi
> ! cd ${INPUT}
>   INPUT=`${PWDCMD}`
> 
>   #

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]