Date problem with drlink

Nick Burrett nick at dsvr.net
Mon Aug 5 02:10:53 PDT 2002


Peter Naulls wrote:
> In message <3D48217C.4020804 at jeffray.co.uk>
>           Ian Jeffray <ian at jeffray.co.uk> wrote:
> 
> 

> Alas.  The problem is that Unixlib gets confused by the redirection:
> 
> program .... ccblah0 >ccmmoooo
>                    |         |
> 
> During the parsing of the command line, Unixlib decides that this
> section refers to a redirection.  I think this is appropriate:

Thanks.  I've committed a slightly different patch.  verify_redirection 
should not allow spaces between file descriptors and redirection operators.

Nick.


> diff -u -r1.2.2.12 unix.c
> --- unixlib/source/unix/unix.c  31 Jul 2002 14:15:34 -0000      1.2.2.12
> +++ unixlib/source/unix/unix.c  1 Aug 2002 21:34:07 -0000
> @@ -796,7 +797,7 @@
>         {
>           /* Don't check for a redirection operator in the first argument
>              because that is the program name.  */
> -         if (argc != 0 && verify_redirection (cli))
> +         if (argc != 0 && isspace(cli[-1]) && verify_redirection (cli))
>             {
>               /* We don't add redirection operators to the argument list.
>                  So skip all characters up until the next real argument.  */
>   

-- 
Nick Burrett
Development Manager, Designer Servers Ltd.   http://www.dsvr.co.uk




More information about the gcc mailing list