Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-30 Thread Janne Blomqvist
On Thu, Sep 18, 2014 at 11:33 PM, Hans-Peter Nilsson wrote: > On Thu, 18 Sep 2014, Janne Blomqvist wrote: >> > If you look back at the patch I posted, there's a >> > typo. :-} Duly warned about, but I'd rather expect the build to >> > fail. >> >> Yes, strange that it didn't fail. There's no prot

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-18 Thread Hans-Peter Nilsson
On Thu, 18 Sep 2014, Janne Blomqvist wrote: > > If you look back at the patch I posted, there's a > > typo. :-} Duly warned about, but I'd rather expect the build to > > fail. > > Yes, strange that it didn't fail. There's no prototype for cf_fstrcpy, > and since we use std=gnu11 prototypes should

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-18 Thread N.M. Maclaren
On Sep 18 2014, Janne Blomqvist wrote: Apparently libgfortran is not compiled with -Werror, at least not for crosses. Maybe -Werror is there for native but I'm not sure as I see some "warning: array subscript has type 'char' [-Wchar-subscripts]" which seems generic and also some others. Though

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-18 Thread Janne Blomqvist
On Thu, Sep 18, 2014 at 11:14 AM, Hans-Peter Nilsson wrote: > On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: >> On Thu, 18 Sep 2014, Janne Blomqvist wrote: >> > On Thu, Sep 18, 2014 at 12:57 AM, Hans-Peter Nilsson >> > wrote: >> > > 'k so we'll track the regressions in a PR. >> > >> > Do you pre

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-18 Thread Hans-Peter Nilsson
On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: > On Thu, 18 Sep 2014, Janne Blomqvist wrote: > > On Thu, Sep 18, 2014 at 12:57 AM, Hans-Peter Nilsson > > wrote: > > > 'k so we'll track the regressions in a PR. > > > > Do you prefer to tack on to 62768 or a new PR? > > Hijacking 62768 for the purp

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Thu, 18 Sep 2014, Janne Blomqvist wrote: > On Thu, Sep 18, 2014 at 12:57 AM, Hans-Peter Nilsson > wrote: > > 'k so we'll track the regressions in a PR. > > Do you prefer to tack on to 62768 or a new PR? Hijacking 62768 for the purposes of reporting a regression for its fix would not be proper

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Janne Blomqvist
On Thu, Sep 18, 2014 at 12:57 AM, Hans-Peter Nilsson wrote: > On Thu, 18 Sep 2014, Janne Blomqvist wrote: >> On Wed, Sep 17, 2014 at 11:36 PM, Hans-Peter Nilsson >> wrote: >> > On the other hand, the tree *is* broken for some ports; I'd >> > prefer regressions to that. So, unless you're onto th

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Thu, 18 Sep 2014, Janne Blomqvist wrote: > On Wed, Sep 17, 2014 at 11:36 PM, Hans-Peter Nilsson > wrote: > > On the other hand, the tree *is* broken for some ports; I'd > > prefer regressions to that. So, unless you're onto this, how do > > you feel about me committing the posted patch and op

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Janne Blomqvist
On Wed, Sep 17, 2014 at 11:36 PM, Hans-Peter Nilsson wrote: > On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: >> On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: >> > On Wed, 17 Sep 2014, Janne Blomqvist wrote: >> > > Oops, I forgot to update some parts in an #ifdef branch that isn't >> > > taken on

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: > On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: > > On Wed, 17 Sep 2014, Janne Blomqvist wrote: > > > Oops, I forgot to update some parts in an #ifdef branch that isn't > > > taken on my target. I'll try to find time to fix it later tonight. If > > >

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote: > On Wed, 17 Sep 2014, Janne Blomqvist wrote: > > Oops, I forgot to update some parts in an #ifdef branch that isn't > > taken on my target. I'll try to find time to fix it later tonight. If > > you're in a hurry, just replace > > > > fstrcpy (iqp->nam

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Wed, 17 Sep 2014, Janne Blomqvist wrote: > > /tmp/hpautotest-gcc1/gcc/libgfortran/io/inquire.c:97:41: error: 'gfc_unit' > > has no member named 'file' > > fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); > > ^ > > /tmp/hpautotest-gcc1/gcc/l

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Janne Blomqvist
On Wed, Sep 17, 2014 at 2:22 PM, Hans-Peter Nilsson wrote: > On Wed, 17 Sep 2014, Janne Blomqvist wrote: >> On Tue, Sep 16, 2014 at 11:17 AM, FX wrote: >> >>> 2014-09-05 Janne Blomqvist >> >>> >> >>>PR libfortran/62768 >> >>>* io/io.h (gfc_unit): Store C string for the filename. >> >>>

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-17 Thread Hans-Peter Nilsson
On Wed, 17 Sep 2014, Janne Blomqvist wrote: > On Tue, Sep 16, 2014 at 11:17 AM, FX wrote: > >>> 2014-09-05 Janne Blomqvist > >>> > >>>PR libfortran/62768 > >>>* io/io.h (gfc_unit): Store C string for the filename. > >>>* io/close.c (st_close): Use gfc_unit.filename. > >>>* io/in

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-16 Thread Janne Blomqvist
On Tue, Sep 16, 2014 at 11:17 AM, FX wrote: >>> 2014-09-05 Janne Blomqvist >>> >>>PR libfortran/62768 >>>* io/io.h (gfc_unit): Store C string for the filename. >>>* io/close.c (st_close): Use gfc_unit.filename. >>>* io/inquire.c (inquire_via_unit): Likewise. >>>* io/open.c (

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-16 Thread FX
>> 2014-09-05 Janne Blomqvist >> >>PR libfortran/62768 >>* io/io.h (gfc_unit): Store C string for the filename. >>* io/close.c (st_close): Use gfc_unit.filename. >>* io/inquire.c (inquire_via_unit): Likewise. >>* io/open.c (new_unit): Likewise. >>(already_open): Likewise

Re: [PR libfortran/62768] Handle filenames with embedded nulls

2014-09-15 Thread Janne Blomqvist
Ping. On Fri, Sep 5, 2014 at 3:54 AM, Janne Blomqvist wrote: > Hi, > > when opening a file with a name containing an ASCII null character, > the name is truncated at the first null since the IO API's take > null-terminated C strings. By storing such a C string in gfc_unit > instead of the origina

[PR libfortran/62768] Handle filenames with embedded nulls

2014-09-04 Thread Janne Blomqvist
Hi, when opening a file with a name containing an ASCII null character, the name is truncated at the first null since the IO API's take null-terminated C strings. By storing such a C string in gfc_unit instead of the original Fortran string INQUIRE for the file name will return the correct name, a