X-Authentication-Warning: new-smtp2.ihug.com.au: Host p52-max13.syd.ihug.com.au [203.173.155.244] claimed to be acceleron Message-ID: <01c701c13087$41737b50$0a02a8c0@acceleron> From: "Andrew Cottrell" To: "Eli Zaretskii" Cc: "Charles Sandmann" , References: Subject: Re: GCC query Date: Wed, 29 Aug 2001 22:36:40 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Reply-To: djgpp-workers AT delorie DOT com > > What is the expected result of ">&5" is the examples below? > > You will see that the configure script (every configure script created by > Autoconf, in fact) has this near its beginning: > > exec 5>./config.log > > This redirects the handle 5 to the file config.log. "1>&5" means the > script wants stdout of the command to be redirected to config.log as > well. Thansk, Now I know what this means. > > configure:1689: gcc -o conftest -g -O2 conftest.c 1>&5 > > ${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext > > $LIBS 1>&5 > > d:/dj204/bin/ld.exe: cannot open output file conftest: Permission denied > > (EACCES) > > collect2: ld returned 1 exit status > > Was Bash you used here built with all the latest W2K-related patches in > _open, _creat, fstat, etc.? How about GCC and Binutils? Bash was built with the latest LIBC from 26-Aug-2001. GCC and Binutils are a bit stale probably only haev the _open patch. I will be building these again on the next few days. Does this matter? > > DJGPP_204 D:\dj204\gnu\bash-2.05>gcc -o conftest -g -O2 conftest.c 1>&5 > > The handle could not be duplicated during redirection of handle 1. > > This is expected: handle 5 is not connected to anything, so you cannot > redirect handle 1 to it. (Also, you shouldn't assume that CMD.EXE > supports the full syntax of a Unixy shell, as far as redirection is > concerned.) I didn't know about the handle 5 re0direction so I thought this info may help out. > If you want a simple way to reproduce the problem, try doing so in a script > which begins with the above-mentioned `exec' command, or from a program > which opens some file on handle 5 before it spawns Bash. I created a small test script as follows and ran it and the output also included below looked fine. Loks like I need to have a closer look at the configure output to see if there are any othe failures above it exits on the gcc comamnd above. I will try this on Friday. test.sh #! /bin/sh exec 5>./test.log echo "Test Start" 1>&5 gcc -o conftest -g -O2 conftest.c 1>&5 test.log file: Test Start Test End