Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-21 Thread Michael Van Canneyt
On Wed, 20 May 2015, Peter wrote: On 20/05/15 16:36, Marco van de Voort wrote: In our previous episode, Peter said: It should work if Truncate64 is used instead of Truncate. I suggest its a bug, albeit probably a wishlist one. http://man7.org/linux/man-pages/man2/ftruncate.2.html ftruncat

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-20 Thread Marco van de Voort
In our previous episode, Peter said: > > > Thanks for that. So is it a bug then? Why is 64-bit not using ftruncate64? I'm no linux expert, but I assume because it is only for 32-bit. On 64-bit, off_t already is 64-bit, so the posix template matches 1:1, and there is no need for another function.

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-20 Thread Peter
On 20/05/15 16:36, Marco van de Voort wrote: > In our previous episode, Peter said: > >> It should work if Truncate64 is used instead of Truncate. >> I suggest its a bug, albeit probably a wishlist one. >> >> http://man7.org/linux/man-pages/man2/ftruncate.2.html > ftruncate64 is already used for 32

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-20 Thread Marco van de Voort
In our previous episode, Peter said: > It should work if Truncate64 is used instead of Truncate. > I suggest its a bug, albeit probably a wishlist one. > > http://man7.org/linux/man-pages/man2/ftruncate.2.html ftruncate64 is already used for 32-bit CPUs, ftruncate for 64-bit cpus You can get in

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-20 Thread Peter
On 18/05/15 08:30, Michael Van Canneyt wrote: > > > On Sun, 17 May 2015, Géza Kovacs Géza wrote: > >> Truncate procedure unable to work under Linux, is this a bug? >> This code is unable to work under linux: the Truncate drops an error >> message if the file is larger than 2 or 3 GB. >> I tested it

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-18 Thread Jürgen Hestermann
Am 2015-05-18 um 09:30 schrieb Michael Van Canneyt: Function FileTruncate (Handle: THandle; Size: Int64) : boolean; but even that does not work with files >2Gb on unix, because the underlying system call does not support it. I don't know what happens on Windows. On windows it should be pos

Re: [fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-18 Thread Michael Van Canneyt
On Sun, 17 May 2015, Géza Kovacs Géza wrote: Truncate procedure unable to work under Linux, is this a bug? This code is unable to work under linux: the Truncate drops an error message if the file is larger than 2 or 3 GB. I tested it with Free Pascal 2.6.4 under Debian Jessie 64 bit. It produc

[fpc-pascal] Truncate procedure unable to work under Linux, is this a bug?

2015-05-17 Thread Géza Kovacs Géza
Truncate procedure unable to work under Linux, is this a bug? This code is unable to work under linux: the Truncate drops an error message if the file is larger than 2 or 3 GB. I tested it with Free Pascal 2.6.4 under Debian Jessie 64 bit. It produce the same error message under Ubuntu 12.04 32 bit