bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mbrtoc32, c32rtomb: fix compilation failures on Haiku


From: Bruno Haible
Subject: mbrtoc32, c32rtomb: fix compilation failures on Haiku
Date: Sat, 09 May 2020 03:01:00 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; )

On a new Haiku/x86_64 system, a gnulib testdir shows these compilation errors:

../../gllib/mbrtoc32.c:86:1: error: redefinition of 'mbrtoc32'
 mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps)
 ^~~~~~~~
In file included from ./uchar.h:32,
                 from ../../gllib/mbrtoc32.c:22:
/boot/system/develop/headers/posix/uchar.h:37:1: note: previous definition of 
'mbrtoc32' was here
 mbrtoc32(char32_t *dest, const char *src, size_t srcLength, mbstate_t *mbState)
 ^~~~~~~~

../../gllib/c32rtomb.c:39:1: error: redefinition of 'c32rtomb'
 c32rtomb (char *s, char32_t wc, mbstate_t *ps)
 ^~~~~~~~
In file included from ./uchar.h:32,
                 from ../../gllib/c32rtomb.c:22:
/boot/system/develop/headers/posix/uchar.h:32:1: note: previous definition of 
'c32rtomb' was here
 c32rtomb(char *dest, char32_t wc, mbstate_t *mbState)
 ^~~~~~~~

The reason is that these functions are defined as static inline functions,
thus AC_CHECK_FUNCS reports that these function were not defined.

These two patches fix the problems.


2020-05-08  Bruno Haible  <address@hidden>

        c32rtomb: Avoid compilation failure on Haiku.
        * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding
        inline definitions.
        * doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.

2020-05-08  Bruno Haible  <address@hidden>

        mbrtoc32: Avoid compilation failure on Haiku.
        * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): New macro.
        (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Use it instead of
        AC_CHECK_FUNCS_ONCE.
        * doc/posix-functions/mbrtoc32.texi: Mention the Haiku problem.

Attachment: 0001-mbrtoc32-Avoid-compilation-failure-on-Haiku.patch
Description: Text Data

Attachment: 0002-c32rtomb-Avoid-compilation-failure-on-Haiku.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]