[PATCH] Don't use subshell redirect in mkconfig.sh

Zack Weinberg zack@codesourcery.com
Wed Jan 30 11:44:00 GMT 2002


On Wed, Jan 30, 2002 at 12:14:52AM -0800, Douglas B Rupp wrote:
> This patch avoids a bug in VMS bash and a limitation of the VMS filesystem.
> 
> A subprocess on VMS is unable to return an updated file position to
> a parent process, so output from the subshell gets garbled.
> 
> Filenames can only contain one "." on VMS.

This looks good to me.  Two observations:

> - rm -f $output.T
> + rm -f T_$output

We already have too many different conventions for naming these
scratch files.  I would prefer you used ${output}T, which is an
existing convention, instead of inventing yet another one.  ("tmp-"
prefix, which is more common, won't work, because tmp-config.h is
already used for something else.)

(Hmm, we create files with multiple dots in several other places,
notably manpage generation.  What are VMS's file name length limits
like?)

>   # Prevent obstack.c from thinking it can do i18n of its error message
>   # when it's being linked against a build-side program.
> ! cat >> T_$output <<EOF
> ! #ifdef GENERATOR_FILE
> ! # undef ENABLE_NLS
> ! #endif
> ! EOF

I suspect this bit is no longer necessary now that we have build-side
libiberty.  It's very difficult for me to test it, though, since
gettext is built into GNU libc.  Would you mind taking it out and
seeing if you get link errors?

zw



More information about the Gcc-patches mailing list