changeset 17180:e0def4d44688

base32, base64: no need for 'inline' * lib/base32.c (to_uchar, get_8, decode_8): * lib/base64.c (to_uchar, get_4, decode_4): Change 'static inline' to 'inline'. * m4/base32.m4 (gl_PREREQ_BASE32): * m4/base64.m4 (gl_PREREQ_BASE64): Do not require AC_C_INLINE.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 20 Nov 2012 22:25:08 -0800
parents bbfb83985261
children a80e4b259d9b
files ChangeLog lib/base32.c lib/base64.c m4/base32.m4 m4/base64.m4
diffstat 5 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
 
+	base32, base64: no need for 'inline'
+	* lib/base32.c (to_uchar, get_8, decode_8):
+	* lib/base64.c (to_uchar, get_4, decode_4):
+	Change 'static inline' to 'inline'.
+	* m4/base32.m4 (gl_PREREQ_BASE32):
+	* m4/base64.m4 (gl_PREREQ_BASE64):
+	Do not require AC_C_INLINE.
+
 	array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
 	* lib/gl_array_oset.c (gl_array_nx_add_at):
 	(gl_array_remove_at):
--- a/lib/base32.c
+++ b/lib/base32.c
@@ -51,7 +51,7 @@
 #include <string.h>
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
@@ -302,7 +302,7 @@
    and return CTX->buf.  In either case, advance *IN to point to the byte
    after the last one processed, and set *N_NON_NEWLINE to the number of
    verified non-newline bytes accessible through the returned pointer.  */
-static inline char *
+static char *
 get_8 (struct base32_decode_context *ctx,
        char const *restrict *in, char const *restrict in_end,
        size_t *n_non_newline)
@@ -356,7 +356,7 @@
    as many bytes as possible are written to *OUT.  On return, advance
    *OUT to point to the byte after the last one written, and decrement
    *OUTLEN to reflect the number of bytes remaining in *OUT.  */
-static inline bool
+static bool
 decode_8 (char const *restrict in, size_t inlen,
           char *restrict *outp, size_t *outleft)
 {
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -53,7 +53,7 @@
 #include <string.h>
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
@@ -314,7 +314,7 @@
    and return CTX->buf.  In either case, advance *IN to point to the byte
    after the last one processed, and set *N_NON_NEWLINE to the number of
    verified non-newline bytes accessible through the returned pointer.  */
-static inline char *
+static char *
 get_4 (struct base64_decode_context *ctx,
        char const *restrict *in, char const *restrict in_end,
        size_t *n_non_newline)
@@ -368,7 +368,7 @@
    as many bytes as possible are written to *OUT.  On return, advance
    *OUT to point to the byte after the last one written, and decrement
    *OUTLEN to reflect the number of bytes remaining in *OUT.  */
-static inline bool
+static bool
 decode_4 (char const *restrict in, size_t inlen,
           char *restrict *outp, size_t *outleft)
 {
--- a/m4/base32.m4
+++ b/m4/base32.m4
@@ -1,4 +1,4 @@
-# base32.m4 serial 3
+# base32.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@
 
 # Prerequisites of lib/base32.c.
 AC_DEFUN([gl_PREREQ_BASE32], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])
--- a/m4/base64.m4
+++ b/m4/base64.m4
@@ -1,4 +1,4 @@
-# base64.m4 serial 3
+# base64.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@
 
 # Prerequisites of lib/base64.c.
 AC_DEFUN([gl_PREREQ_BASE64], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])