Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Marco van de Voort
In our previous episode, Bart said: > > That was the original idea, removing the shortstring versions for not > > embedded targets, so that nobody accidentally could call shortstring > > versions. (and only find out runtime) > > > > But that was deemed to confusing, so now both sets are back again

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
On 9/1/13, Jonas Maebe wrote: > Correct. Thanks for the explanations. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Jonas Maebe
On 01 Sep 2013, at 16:34, Bart wrote: > This would mean that (in the cpstr branch) calling any IO function > with LongStrings (or the like) will NOT suffer from the problems the > shortstring counterparts have? Correct. Jonas___ fpc-pascal maillist

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
On 9/1/13, Marco van de Voort wrote: > That was the original idea, removing the shortstring versions for not > embedded targets, so that nobody accidentally could call shortstring > versions. (and only find out runtime) > > But that was deemed to confusing, so now both sets are back again. If I

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Tomas Hajny
On 1 Sep 13, at 14:32, Marco van de Voort wrote: > In our previous episode, Bart said: > > > As I wrote - > > > the other file and directory related functions and procedures have > > > always had only shortstring interfaces, whereas with GetDir there has > > > also been the ansistring version). > >

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Marco van de Voort
In our previous episode, Bart said: > > As I wrote - > > the other file and directory related functions and procedures have > > always had only shortstring interfaces, whereas with GetDir there has > > also been the ansistring version). > > I would prefer waiting for _all_ IO functions to handle L

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
On 8/31/13, Tomas Hajny wrote: > That probably depends on the level of urgency this issue has for you. ATM it does not happen in real world scenarios for me. > As I wrote - > the other file and directory related functions and procedures have > always had only shortstring interfaces, whereas with

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Tomas Hajny
On 31 Aug 13, at 18:37, Bart wrote: > On 8/31/13, Tomas Hajny wrote: > > > In general, it is a known fact that file system related functions provided > > by unit System are limited to shortstrings. From this point of view, > > GetDir is rather an exception (and admittedly rather unfortunate one >

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
On 8/31/13, Tomas Hajny wrote: > In general, it is a known fact that file system related functions provided > by unit System are limited to shortstrings. From this point of view, > GetDir is rather an exception (and admittedly rather unfortunate one > considering the current state of implementati

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Tomas Hajny
On Sat, August 31, 2013 16:55, Bart wrote: > On 8/31/13, Tomas Hajny wrote: >> Now, as you have already found out yourself too, it is not an issue with >> ExpandFileName only, but also with the overloaded version of GetDir >> returning ansistring but still limited to 255 characters. I could >> pro

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Jonas Maebe
On 31 Aug 2013, at 16:55, Bart wrote: > On 8/31/13, Tomas Hajny wrote: >> Now, as you have already found out yourself too, it is not an issue with >> ExpandFileName only, but also with the overloaded version of GetDir >> returning ansistring but still limited to 255 characters. I could provide >

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
On 8/31/13, Tomas Hajny wrote: > Now, as you have already found out yourself too, it is not an issue with > ExpandFileName only, but also with the overloaded version of GetDir > returning ansistring but still limited to 255 characters. I could provide > a workaround for ExpandFileName (using SysUt

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Tomas Hajny
On Sat, August 31, 2013 15:59, Bart wrote: > On 8/31/13, Michael Van Canneyt wrote: > >> Did you enable ansistrings and object pascal mode ? >> Because as it is displayed above, the program will use shortstrings, and >> they are limited to 255 chars. > > Yes (I typed the example from the top if my

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
On 8/31/13, Michael Van Canneyt wrote: > Did you enable ansistrings and object pascal mode ? > Because as it is displayed above, the program will use shortstrings, and > they are limited to 255 chars. Yes (I typed the example from the top if my head): (ObjFpc mode should not matter though as lon

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Tomas Hajny
On Sat, August 31, 2013 15:24, Michael Van Canneyt wrote: > On Sat, 31 Aug 2013, Bart wrote: Hi, >> Before reporting this as a bug, can somebody confirm? >> >> program efn; >> >> uses sysutils; >> >> begin >> writeln(expandfilename(paramstr(1))); >> end. >> >> If I cd to a directory with a very

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Michael Van Canneyt
On Sat, 31 Aug 2013, Bart wrote: Hi, Before reporting this as a bug, can somebody confirm? program efn; uses sysutils; begin writeln(expandfilename(paramstr(1))); end. If I cd to a directory with a very long name (>255 chars) and then exeucte the following: $ ~/LazarusProjecten/bugs/find

[fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
Hi, Before reporting this as a bug, can somebody confirm? program efn; uses sysutils; begin writeln(expandfilename(paramstr(1))); end. If I cd to a directory with a very long name (>255 chars) and then exeucte the following: $ ~/LazarusProjecten/bugs/findfirst/efn . It prints out only the f