]> Savannah Git Hosting - gnulib.git/commitdiff
c32rtomb: Use module 'attribute'.
authorBruno Haible <bruno@clisp.org>
Fri, 8 May 2020 16:07:17 +0000 (18:07 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 8 May 2020 16:41:56 +0000 (18:41 +0200)
* lib/c32rtomb.c: Include attribute.h.
(FALLTHROUGH): Remove macro.
* modules/c32rtomb (Depends-on): Add attribute.

ChangeLog
lib/c32rtomb.c
modules/c32rtomb

index df4f5d102ee36ebbb403f6a4f4212489703b857f..43946e0acfc89f91f2ddbcae9b39aaf70c48ae6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-05-08  Bruno Haible  <bruno@clisp.org>
+
+       c32rtomb: Use module 'attribute'.
+       * lib/c32rtomb.c: Include attribute.h.
+       (FALLTHROUGH): Remove macro.
+       * modules/c32rtomb (Depends-on): Add attribute.
+
 2020-05-08  Bruno Haible  <bruno@clisp.org>
 
        xsize: Use module 'attribute'.
index ba399295ad37cf8c21de2ea8fc240db2083a3073..8e4fb56761118be75c1304f6e7bcf82158ca8f16 100644 (file)
 #include <errno.h>
 #include <wchar.h>
 
+#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
index ea227dfd5dad0675868920326f0ec81bad186c13..9863d7020767ebad505f810839c47d6b9a2c807d 100644 (file)
@@ -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]