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
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
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
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
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
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
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
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
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
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.
>
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
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
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
13 matches
Mail list logo