Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-12 Thread Janne Blomqvist
On Wed, Jan 11, 2012 at 14:55, Tobias Burnus wrote: > Dear all, > > this is a follow up patch, which I think provides a better handling if > either getcwd fails or is not availble - or if the pathname in argv[0] > already is an absolute patch, in which case concatenating > current-working-director

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Janne Blomqvist
On Wed, Jan 11, 2012 at 16:04, Tobias Burnus wrote: > On 01/11/2012 02:08 PM, Janne Blomqvist wrote: >> >> Checking for an absolute path is already done a few lines up. So if >> you prefer the kind of approach that you have in your patch, IMHO a >> more correct patch would be > > > I had a quick c

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Tobias Burnus
Same patch with a minor update: I changed "cwd" from "char *" to "const char *" as I spotted a compile time warning for cwd = "."; which was along the lines that by the assignment the const qualifier is lost. Too bad that we cannot enable -Werror for libgfortran. On 01/11/2012 03:04 PM, To

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Tobias Burnus
On 01/11/2012 02:08 PM, Janne Blomqvist wrote: Checking for an absolute path is already done a few lines up. So if you prefer the kind of approach that you have in your patch, IMHO a more correct patch would be I had a quick chat with Kai and decided to leave the lower part as is. However, I r

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Janne Blomqvist
On Wed, Jan 11, 2012 at 14:55, Tobias Burnus wrote: > Dear all, > > this is a follow up patch, which I think provides a better handling if > either getcwd fails or is not availble - or if the pathname in argv[0] > already is an absolute patch, in which case concatenating > current-working-director

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Tobias Burnus
Dear all, this is a follow up patch, which I think provides a better handling if either getcwd fails or is not availble - or if the pathname in argv[0] already is an absolute patch, in which case concatenating current-working-directory + '/' + argv[0] does not really make sense. Build on x86

Re: [Patch libfortran] PR 51803 getcwd() failure

2012-01-11 Thread Tobias Burnus
Hi Janne, On 01/11/2012 08:37 AM, Janne Blomqvist wrote: Index: runtime/main.c === --- runtime/main.c (revision 183089) +++ runtime/main.c (working copy) @@ -116,8 +116,10 @@ store_exe_path (const char * argv0) memset

[Patch libfortran] PR 51803 getcwd() failure

2012-01-10 Thread Janne Blomqvist
Hi, I committed the attached patch as obvious to trunk after the RM considered it OK in the PR. Index: runtime/main.c === --- runtime/main.c (revision 183089) +++ runtime/main.c (working copy) @@ -116,8 +116,10 @@ store_exe