New gnulib user !

2022-06-29 Thread Vivien Kraus
Dear gnulib people, I have recently learnt how to use gnulib, and I have to say, it is pretty impressive. It provides some very useful functions, and it integrates smoothly with my existing workflows, including git and, more surprisingly, guix. I am still discovering the modules, but have already

Re: New gnulib user !

2022-07-03 Thread Vivien Kraus
Hello, Le dimanche 03 juillet 2022 à 16:52 +0200, Bruno Haible a écrit : > +Here @code{BUILDING_SHARED} is a C macro that you have to define.  > It > +ought to evaluate to 1 in a build configured with @samp{--enable- > shared}, > +or to 0 in a build configured with @samp{--disable-shared}. That’s

--with-tests and address sanitizer

2022-09-05 Thread Vivien Kraus
Dear gnulib developers, If I try to include the gnulib tests with my project, and build with address sanitizer, then almost all tests fail, many of which because of 64 bytes allocated in argz_add_sep, a few others are because the amount of bytes required for an allocation is too large, and asan de

gl_omap.h: why does the dispose function expect a CONST void*?

2022-09-19 Thread Vivien Kraus
Hello, In gl_omap.h, the function to delete a key or a value from an omap is declared as: typedef void (*gl_mapkey_dispose_fn) (const void *key); typedef void (*gl_mapvalue_dispose_fn) (const void *value); They are always called on a value marked as const void *. Why is it the case? I will have

Re: RFC: git-commit based mtime-reproducible tarballs

2023-01-16 Thread Vivien Kraus
Hello, Le dimanche 15 janvier 2023 à 08:03 -0800, Paul Eggert a écrit : > For TZDB, where users have long wanted reproducibility, I use > something > like this in a Makefile recipe for each source file $$file: > >   time=`git log -1 --format='tformat:%ct' $$file` && >   t

Release management: how do you update the libtool version information?

2023-03-03 Thread Vivien Kraus
Dear gnulib people, How do you manage the libtool version information for a library using gnulib? For now, I have it written down explicitly in configure.ac. Unfortunately, this requires a new commit to bump the numbers before each release. Gnulib provides a script to help update the libtool vers

Re: RFC: add a string-desc module

2023-03-25 Thread Vivien Kraus
Le vendredi 24 mars 2023 à 19:20 -0400, Jeffrey Walton a écrit : >  The type that I'm proposing does not have NUL byte appended to the > data > > always and automatically, because I think it is more important to > > have a > > string_desc_substring function that does not cause memory > > allocation

%reldir% in gnulib's Makefile.am

2018-02-18 Thread Vivien Kraus
Hello, I would like to use gnulib for my autotools-based project. However, when I want to link the gnulib in my program: SUBDIRS = lib bin_PROGRAMS = test test_LDADD = lib/libgnu.la make cannot re-build lib/libgnu.la since it is defined in lib/Makefile.am as the target "libgnu.la" a

Re: parse-datetime.c generated in the source (instead of build) directory

2018-03-16 Thread Vivien Kraus
Hello, Distributing the generated sources is the default behaviour to expect from automake; I don't really understand why it is needed to override the .y.c rule... This behaviour permits you to configure, build, install, check... the package without having bison installed. Since the generated .c

Re: parse-datetime.c generated in the source (instead of build) directory

2018-03-16 Thread Vivien Kraus
Sorry, I have just checked and automake does not distribute the generated source by default, thus the modified .y.c rule is required. Le vendredi 16 mars 2018 à 19:09 +0100, Vivien Kraus a écrit : > Hello, > > Distributing the generated sources is the default behaviour to expect > f

Re: RFC: add a string-desc module

2023-03-25 Thread Vivien Kraus
Hello! I frequently use ad-hoc code for this, however in library code, in which xmalloc is not much used. I learn new gnulib things primarily from the manual. Do you plan to document it there? Le vendredi 24 mars 2023 à 22:50 +0100, Bruno Haible a écrit : > /* Return a copy of string S, as a NUL

Parameterize the memory allocator for the container library

2024-02-10 Thread Vivien Kraus
Dear gnulib developers, Is it possible to parameterize the memory allocator for the ordered map library? I see, for instance, that the rbtree implementation uses gl_rbtree_ordered.h, after defining things like NODE_PAYLOAD_PARAMS. I think it would be easy to add a couple of function pointers and s

Re: GNU gnulib: calling for beta-testers

2024-04-21 Thread Vivien Kraus
Dear Gnulib developers, Le dimanche 21 avril 2024 à 06:52 -0400, Bruno Haible a écrit : > If you are developer on a package that uses GNU gnulib as part of its > build > system: I have a very simple personal project using gnulib. > 1. Make sure you have Python (version 3.7 or newer) installed on

How does enable_shared work in lib-symbol-visibility?

2025-03-14 Thread Vivien Kraus
Dear Gnulib people, In manual section 19.2 Controlling the Exported Symbols of Shared Libraries, I see you define BUILDING_SHARED to 1 if "$enable_shared" is "yes", and 0 otherwise. This seems to be a Windows-specific thing, but when I run ./configure - -help, I read: --enable-shared[=PKGS] b

Re: new module 'vc-mtime'

2025-02-27 Thread Vivien Kraus
Hello, Le lundi 24 février 2025 à 19:10 +0100, Bruno Haible via Gnulib discussion list a écrit : > Include: > "vm-mtime.h" Should that not be "vc-mtime.h"? Best regards, Vivien

Re: new module 'vc-mtime'

2025-02-27 Thread Vivien Kraus
Hello, Le lundi 24 février 2025 à 19:10 +0100, Bruno Haible via Gnulib discussion list a écrit : > The "version-controlled modification time" vc_mtime(F) of a file F >    is defined as: > - If F is under version control and not modified locally: >    the time of the last change of F in th

vasprintf-gnu wants me to #include "vasprintf.h" but it does not exist

2025-03-03 Thread Vivien Kraus
Dear Gnulib developers, I want asprintf. The manual page tells me it can be provided by vasprintf-gnu. However, if I import the vasprintf-gnu module, it tells me to add: #include "vasprintf.h" (like vasprintf-posix, but vasprintf tells me to just include stdio.h) But this file does not seem to

localename wants me to add @INTL_MACOSX_LIBS@ to my link libraries, but maint.mk does not like the @'s

2025-02-28 Thread Vivien Kraus
Dear Gnulib developers, When I add the setlocale module, it pulls localename in. This one wants me to link my programs and libraries with @INTL_MACOSX_LIBS@, but then syntax-check (makefile_at_at_check) complains that it has @'s. If I should use $(INTL_MACOSX_LIBS) instead, why does the localename

safe-alloc: Does REALLOC_N leak if reallocation fails?

2025-07-12 Thread Vivien Kraus
Dear gnulib developers, In the manual (safe-alloc.texi), I read for the definition of REALLOC_N: If reallocation fails, the @code{ptr} variable is not modified. This claim is justified a little bit earlier in the text: Some of the memory allocation mistakes that are commonly made are

Re: getopt_long API

2025-06-25 Thread Vivien Kraus
Hello! Le mercredi 25 juin 2025 à 10:06 -0700, Paul Eggert a écrit : > It would be nice to do the getopt check statically, if we're going to > do > it at all. > > While we're on the getopt topic, glibc might add translation of > getopt > argument strings: > > https://sourceware.org/pipermail/l