This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch for fixinc to fix Solaris2 hosted cross compiler build failure
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: patch for fixinc to fix Solaris2 hosted cross compiler build failure
- From: Bruce Korb <bkorb at sco dot COM>
- Date: Thu, 20 Jan 2000 07:40:32 -0800
- CC: gcc-patches at gcc dot gnu dot org, Bruce Korb <autogen at linuxbox dot com>
- Organization: Santa Cruz Operation
- References: <200001200450.UAA29798@ada.cygnus.com.cygnus.com>
- Reply-To: Bruce Korb <autogen at linuxbox dot com>
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}`
>
> #