Re: ftruncate: Accept lengths > 2 GiB on 32-bit mingw

2024-11-13 Thread Bruno Haible via Gnulib discussion list
> 2024-11-14 Bruno Haible > > ftruncate: Accept lengths > 2 GiB on 32-bit mingw. Oops, this added support for mingw broke the support for MSVC. We need to have support for both. 2024-11-14 Bruno Haible ftruncate, ftello: Make them work again for large files on MSVC.

Re: fseek and ftell with large files on Windows

2024-11-13 Thread Markus Mützel
Am 14. November 2024 um 05:18 schrieb "Bruno Haible": > And with this additional patch, ftello() works on large files on mingw. > > > 2024-11-14 Bruno Haible > >ftello: Fix override on mingw. >Reported by Markus Mützel in >. >* lib/ftello.c: Test whether module 'largefile' is

pthread-rwlock tests: Fix compilation error on AIX with xlc

2024-11-13 Thread Bruno Haible via Gnulib discussion list
On AIX 7.1, with xlc, I see this compilation error: "../../gltests/test-pthread-rwlock-waitqueue.c", line 200.49: 1506-226 (S) The ":" operator is not allowed between "void*(void*)" and "int". This patch fixes it. Maybe we should override NULL on this platform (where it is defined as 0)? 2024

fseeko, ftello: Add tests for large files

2024-11-13 Thread Bruno Haible via Gnulib discussion list
The long-standing bug with ftello on mingw and 32-bit Solaris OpenIndiana could only go undetected for so long because we had no unit test for it. Admittedly, a unit test that creates a 3 GB file could be considered crazy a couple of years ago. But gnulib-tool now has mechanisms to enable such test

Re: fseek and ftell with large files on Windows

2024-11-13 Thread Bruno Haible via Gnulib discussion list
And with this additional patch, ftello() works on large files on mingw. 2024-11-14 Bruno Haible ftello: Fix override on mingw. Reported by Markus Mützel in . * lib/ftello.c: Test whether modu

Re: fseek and ftell with large files on Windows

2024-11-13 Thread Bruno Haible via Gnulib discussion list
Markus Mützel wrote: > I found the following in the generated "config.in.h": > > /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ > #undef HAVE_FSEEKO > > That was replaced with the following in the generated "config.h" after > running the configure script: > > /* Def

ftruncate: Accept lengths > 2 GiB on 32-bit mingw

2024-11-13 Thread Bruno Haible via Gnulib discussion list
ftruncate() takes an off_t argument. On mingw-w64, this is 64-bits wide; the module 'largefile' does not need to override off_t. Still, in this situation, it is wrong to use _chsize() since that takes only a 32-bit argument. This patch fixes it. 2024-11-14 Bruno Haible ftruncate: Acc

Re: fseek and ftell with large files on Windows

2024-11-13 Thread Bruno Haible via Gnulib discussion list
Markus Mützel wrote: > With those, liboctave.dll still used "ftell". > It took me a while to assure it isn't coming from anywhere else. But the only > place that made use of that symbol is from "gnulib/lib/ftello.c". > ... > But no match for HAVE_FTELLO in "config.in.h" nor in "config.h". > > Wi

Re: gnulib-manywarnings: Enable -Wzero-as-null-pointer-constant

2024-11-13 Thread Bruno Haible via Gnulib discussion list
Hi Alejandro, > We're planning a path for deprecation of 0 as a null pointer constant, > in favor of NULL +1 For reference, we discussed the use of nullptr in Gnulib [1][2] in the past. > As a first step, Joseph proposed adding it into gnulib's manywarnings. > Does it sound good to you? Yes. U

gnulib-manywarnings: Enable -Wzero-as-null-pointer-constant

2024-11-13 Thread Alejandro Colomar
Hi Bruno, Link: Link: GCC 15 has added -Wzero-as-null-pointer-constant for C (or actually, will, once it's released). We're planning a path for deprecation of 0 as a null point

Re: fseek and ftell with large files on Windows

2024-11-13 Thread Markus Mützel
My email provider started to mess with outgoing only-text messages. So, apologies if some characters are replaced incorrectly. Am 13. November 2024 um 00:54 schrieb "Bruno Haible": > In order to make sure that Octave does not have bugs with files > 2 GiB > (without restrictions like "as far as I

Re: gnulib --remove-import removes every module except the one to remove

2024-11-13 Thread Gavin Smith
On Wed, Nov 13, 2024 at 02:36:40AM +0100, Bruno Haible wrote: > Hi Gavin, > > > I wanted to remove "copy-file", but it actually removed every other module. > > Thanks for the report. I am committing this probable fix (untested). Can you > please give it a try? I can confirm this works. Thanks f