summaryrefslogtreecommitdiff
path: root/lib/mbchar.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-29 20:59:53 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-22 01:58:23 -0700
commit32d8297adbb0fc03f1e0706005e144c7f498507c (patch)
tree4880f1f090f9af6788c0638a81adc8b0df723ccf /lib/mbchar.h
parentc0d12ddf618396354fdb23264cbda30f81d0d344 (diff)
downloadgnulib-32d8297adbb0fc03f1e0706005e144c7f498507c.tar.gz
acl, mbchar, priv-set: use extern-inline
* lib/set-mode-acl.c, lib/acl-internal.h (ACL_INTERNAL_INLINE): * lib/mbchar.c, lib/mbchar.h (MBCHAR_INLINE): * lib/priv-set.c, lib/priv-set.h (PRIV_SET_INLINE): New macros. * lib/acl-internal.h, lib/mbchar.h, lib/priv-set.h: Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/acl.m4 (gl_FUNC_ACL): * m4/mbchar.m4 (gl_MBCHAR): * m4/priv-set.m4 (gl_PRIV_SET): Remove AC_C_INLINE, since 'inline' is no longer used directly. * modules/acl, modules/mbchar, modules/priv-set (Depends-on): Add extern-inline.
Diffstat (limited to 'lib/mbchar.h')
-rw-r--r--lib/mbchar.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/mbchar.h b/lib/mbchar.h
index ccbcb827e5..001f74310b 100644
--- a/lib/mbchar.h
+++ b/lib/mbchar.h
@@ -156,6 +156,11 @@
#include <wchar.h>
#include <wctype.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBCHAR_INLINE
+# define MBCHAR_INLINE _GL_INLINE
+#endif
+
#define MBCHAR_BUF_SIZE 24
struct mbchar
@@ -235,7 +240,7 @@ typedef struct mbchar mbchar_t;
/* Unprintable characters appear as a small box of width 1. */
#define MB_UNPRINTABLE_WIDTH 1
-static inline int
+MBCHAR_INLINE int
mb_width_aux (wint_t wc)
{
int w = wcwidth (wc);
@@ -256,7 +261,7 @@ mb_width_aux (wint_t wc)
(mbc)->wc = (mbc)->buf[0] = (sc))
/* Copying a character. */
-static inline void
+MBCHAR_INLINE void
mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc)
{
if (old_mbc->ptr == &old_mbc->buf[0])
@@ -304,7 +309,7 @@ mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc)
extern const unsigned int is_basic_table[];
-static inline bool
+MBCHAR_INLINE bool
is_basic (char c)
{
return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))
@@ -313,7 +318,7 @@ is_basic (char c)
#else
-static inline bool
+MBCHAR_INLINE bool
is_basic (char c)
{
switch (c)
@@ -347,4 +352,6 @@ is_basic (char c)
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _MBCHAR_H */