WIP patch to reduce rewrite_filename duplication

2024-04-24 Thread Collin Funk
Hi Bruno, I haven't pushed this patch yet, but it goes in the correct direction, in my opinion. Here we were talking about the rewrite_filename functions: https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00268.html I asked about the 'test=lib/' filename replacement under mode == 'c

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Collin Funk
Hi Simon, On 4/24/24 6:22 AM, Simon Josefsson wrote: > I think this was fairly common before. If there had been a 'make > syntax-check' rule for this, we would have caught it! I have removed > use of HAVE_CONFIG_H and fixed telnetd.h in Inetutils now, thanks. Thanks! It showed up from some othe

gnulib-tool.py: Add a new GLFileTable class.

2024-04-24 Thread Collin Funk
I've applied the following patch adding a GLFileTable class as discussed here: https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00357.html For the most part this just changes a dictionary in GLImport to an actual class. So field initialization is done in GLFileTable.__init__() and use

Re: [PATCH] largefile: port to C++

2024-04-24 Thread Sam James
Paul Eggert writes: > This patch is mostly taken from Autoconf master. > * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED): > Undefine if unpatched Autoconf 2.72 or earlier, so that > later code will redefine it. > The remaining part of this patch is from Autoconf master. > (_AC_SYS_YEAR2038_PROBE,

[PATCH] largefile: port to C++

2024-04-24 Thread Paul Eggert
This patch is mostly taken from Autoconf master. * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED): Undefine if unpatched Autoconf 2.72 or earlier, so that later code will redefine it. The remaining part of this patch is from Autoconf master. (_AC_SYS_YEAR2038_PROBE, _AC_SYS_LARGEFILE_PROBE): Put "$C

Re: 'relocatable' project built without --enable-relocatable

2024-04-24 Thread Reuben Thomas
On Wed, 24 Apr 2024 at 01:24, Bruno Haible wrote: > > Can you please try the attached patch? > Works beautifully, thanks. (Sorry to cause confusion: I was actually quoting code from a C-based project, not a Vala-based project, where I don't need the fix. But if you install this patch then I will

Re: printf functions without INT_MAX limitation

2024-04-24 Thread Paul Eggert
On 4/22/24 7:21 AM, Bruno Haible wrote: dealing with this problem means to define 2 functions instead of 1. Since Gnulib is a source library, that complexity would be needed only for use inside object libraries - and these libraries already need to deal with off_t issues. (Also, the prob

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Collin Funk
On 4/24/24 11:06 AM, Bruno Haible wrote: >> $ env GNULIB_TOOL_IMPL=py gnulib-tool --create-testdir --dir testdir1 fstatat >> $ cd testdir1 >> $ ./configure --enable-silent-rules >> $ make 2>&1 | grep '__STDC_WANT_LIB_EXT1__' | wc -l >> 354 > > I don't reproduce this. What are your CPPFLAGS and CFL

[PATCH] c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14

2024-04-24 Thread Paul Eggert
* lib/c32srtombs-state.c (_gl_c32srtombs_state): * lib/mbsrtoc32s-state.c (_gl_mbsrtoc32s_state): * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Add an extern decl for a “private” extern symbol, to pacify GCC 14’s -Wmissing-variable-declarations option

Re: Gnulib in Debian

2024-04-24 Thread Reuben Thomas
On Wed, 24 Apr 2024 at 15:56, Simon Josefsson wrote: > > The last aspect should be solved: the latest gnulib in Debian contains a > git bundle of gnulib, That's fantastic, I wish I had thought of that. I still don't fancy doing the necessary packaging work, but I'll let those who have been help

physmem: Port better to Linux

2024-04-24 Thread Bruno Haible
I'm writing a unit test that takes 12 GiB of RAM, and want to test whether it is adequate to run this test. In a first attempt, I wrote: if (physmem_total () / INT_MAX < 6.0) /* run the test */ but this resulted in the test not being run, although my machine has plenty of RAM: $ ./tes

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Bruno Haible
Hi Collin, > $ env GNULIB_TOOL_IMPL=py gnulib-tool --create-testdir --dir testdir1 fstatat > $ cd testdir1 > $ ./configure --enable-silent-rules > $ make 2>&1 | grep '__STDC_WANT_LIB_EXT1__' | wc -l > 354 I don't reproduce this. What are your CPPFLAGS and CFLAGS? Bruno

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Bruno Haible
Paul Eggert wrote: > Why is telnetd.h including config.h? Only a top-level C file should > include config.h, and it should so so at the start. We don't have a rule that config.h should *only* be included at the start of each compilation unit. Packages can and do include twice. Therefore config.

Re: Gnulib in Debian

2024-04-24 Thread Simon Josefsson via Gnulib discussion list
Reuben Thomas writes: > TLDR: FTP Master rejected my libpaper package because it contains gnulib > source files. I pointed out that other Debian packages for which I am > upstream do exactly this and have been accepted, and that it is the > standard way to use gnulib. A few senior Debian Develope

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Simon Josefsson via Gnulib discussion list
Collin Funk writes: > Hi Paul, > > On 4/23/24 11:22 PM, Paul Eggert wrote: >> Why is telnetd.h including config.h? Only a top-level C file should >> include config.h, and it should so so at the start. > > I don't disagree. Most of those lines are 20 years old, so I assume it > wasn't a problem th

Re: Gnulib in Debian

2024-04-24 Thread Reuben Thomas
On Wed, 24 Apr 2024 at 01:51, Bruno Haible wrote: > Reuben Thomas wrote: > > (not yet in Debian, sadly, as they don't like me "vendoring gnulib", as > FTP > > Master calls it, or "using gnulib as other packages like Enchant do, and > as > > designed", as I call it). > > I assume you are alluding