Some more reminders

2023-04-13 Thread Bruno Haible
Some .h files (other than .in.h files) test various HAVE_* macros, set by Autoconf macros. These files too need to be included first. These two patches handle these .h files. 2023-04-13 Bruno Haible Add more reminders to include . * lib/aligned-malloc.h: Check that config.h

Re: Some more reminders

2023-04-13 Thread Bruno Haible
Paul Eggert wrote: > For example, lib/parse-duration.h currently > doesn't have the reminder, even though it uses time_t and > therefore is vulnerable to a bug if a program includes it without > including config.h (and defining _TIME_BITS) first. Good point. parse-duration.h is not defining

Adjust comments in reminders

2023-04-13 Thread Bruno Haible
In the reminder comments, it's also useful to mention the HAVE_RAW_DECL_* macros, used by the 'posixcheck' module. 2023-04-13 Bruno Haible Adjust comments in reminders. * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*. * Makefile

Re: Some more reminders

2023-04-13 Thread Paul Eggert
On 4/13/23 14:56, Bruno Haible wrote: /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_ALLOC_SIZE, - _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL. */ + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, HAVE_POSIX_MEMALIGN. */ #if !_GL_CONFIG_H_INCLUDED

Re: Some more reminders

2023-04-13 Thread Bruno Haible
Hi Paul, > > /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, > > _GL_ATTRIBUTE_ALLOC_SIZE, > > - _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL. */ > > + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, > > HAVE_POSIX_MEMALIGN. */ > > #if !_GL_CONFIG_H_INCLUDED > > At

Re: Some more reminders

2023-04-13 Thread Paul Eggert
On 4/13/23 15:18, Bruno Haible wrote: * The bitrot will happen, but is harmless since it's only in comments. * I wish to avoid to break applications without good need. I Both fair points. Still, how far does this go? For example, lib/parse-duration.h currently doesn't have the

ialloc, gethrxtime: Restore GCC diagnostics options

2023-04-13 Thread Bruno Haible
When a header file invokes _GL_INLINE_HEADER_BEGIN but not _GL_INLINE_HEADER_END, the effect is that two pragmas _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ remain in effect until the end of the compilation

flexmember: Fix module description

2023-04-13 Thread Bruno Haible
The users of the 'flexmember' module need to #include "flexmember.h". Without this #include, they only get the FLEXIBLE_ARRAY_MEMBER macro, which they can also get without the module, by invoking Autoconf's AC_C_FLEXIBLE_ARRAY_MEMBER. 2023-04-13 Bruno Haible flexmember: Fix module

Re: Add more reminders to include

2023-04-13 Thread Pádraig Brady
On 12/04/2023 18:51, Bruno Haible wrote: Pádraig Brady wrote: CC src/cksum-crctab.o In file included from ./lib/time.h:50, from /usr/include/sys/time.h:421, from ./lib/sys/time.h:39, from /usr/include/sys/select.h:23, from ./lib/sys/select.h:36, from

Re: #if !_GL_CONFIG_H_INCLUDED breaks flex generated lexers, FYI

2023-04-13 Thread Paul J. Lucas
On Apr 13, 2023, at 10:57 AM, Bruno Haible wrote: >> IMHO, this is a problem with Flex, not GnuLib. Flex should have a mechanism >> to insert code at the top of the generated lexer like Bison’s "%code top” >> directive. > > As far as I know, it already has. >

#if !_GL_CONFIG_H_INCLUDED breaks flex generated lexers, FYI

2023-04-13 Thread Paul J. Lucas
Hello - This recent commit: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=8ad7bc671475d3291df10a1a1d64fddfd30e5175 renders Flex generated lexers uncompilable. If you use GnuLib, you're using wrappers around standard headers like stdio.h. The recent commit added lines to such

Re: #if !_GL_CONFIG_H_INCLUDED breaks flex generated lexers, FYI

2023-04-13 Thread Bruno Haible
Hello Paul, > This recent commit: > > https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=8ad7bc671475d3291df10a1a1d64fddfd30e5175 > > renders Flex generated lexers uncompilable. If you use GnuLib, you're using > wrappers around standard headers like stdio.h. The recent commit added

Avoid using HAVE_* macros in *.in.h files

2023-04-13 Thread Bruno Haible
Although most of the .h files now require , it is useful if the .h files generated from .in.h files don't use HAVE_* C macros, except for the mass of HAVE_RAW_DECL_* macros, which are only used by the 'posixcheck' module. Namely, the advantage is in analysis of problem reports: If in a generated