[PATCH 2 of 9] build/internals.sh: Replace nonportable call to stat

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Tue May 18 22:49:00 GMT 2010


Arnaud, Titus, All,

On Tuesday 18 May 2010 22:40:05 Arnaud Lacombe wrote:
> On Mon, May 17, 2010 at 8:27 AM, Titus von Boxberg <titus@v9g.de> wrote:
> > -            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
> > +            if [ -z "`readlink ${_t}`" ]; then

> hum, test(1) tells me:
>        -h FILE
>               FILE exists and is a symbolic link (same as -L)
> I think this is what is intended to be done, no ?

Yes, and it is in POSIX.1-2008. Plain and simple.
Titus, can you check if test(1) on BSD/MacOS is conformant ?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list