From 99f273d57206e2c9b484928e9b76b97e6ad49398 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 8 May 2020 18:07:17 +0200 Subject: [PATCH] c32rtomb: Use module 'attribute'. * lib/c32rtomb.c: Include attribute.h. (FALLTHROUGH): Remove macro. * modules/c32rtomb (Depends-on): Add attribute. --- ChangeLog | 7 +++++++ lib/c32rtomb.c | 9 +-------- modules/c32rtomb | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index df4f5d102e..43946e0acf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-05-08 Bruno Haible + + c32rtomb: Use module 'attribute'. + * lib/c32rtomb.c: Include attribute.h. + (FALLTHROUGH): Remove macro. + * modules/c32rtomb (Depends-on): Add attribute. + 2020-05-08 Bruno Haible xsize: Use module 'attribute'. diff --git a/lib/c32rtomb.c b/lib/c32rtomb.c index ba399295ad..8e4fb56761 100644 --- a/lib/c32rtomb.c +++ b/lib/c32rtomb.c @@ -24,17 +24,10 @@ #include #include +#include "attribute.h" /* FALLTHROUGH */ #include "localcharset.h" #include "streq.h" -#ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else -# define FALLTHROUGH __attribute__ ((__fallthrough__)) -# endif -#endif - size_t c32rtomb (char *s, char32_t wc, mbstate_t *ps) #undef c32rtomb diff --git a/modules/c32rtomb b/modules/c32rtomb index ea227dfd5d..9863d70207 100644 --- a/modules/c32rtomb +++ b/modules/c32rtomb @@ -8,6 +8,7 @@ m4/mbrtoc32.m4 Depends-on: uchar +attribute [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] wchar [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] wcrtomb [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] localcharset [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && test $SMALL_WCHAR_T = 1] -- 2.39.5