base32, base64: no need for 'inline'
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Nov 2012 06:25:08 +0000 (22:25 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2012 07:38:53 +0000 (23:38 -0800)
* 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.

ChangeLog
lib/base32.c
lib/base64.c
m4/base32.m4
m4/base64.m4

index 77ce488..564fe95 100644 (file)
--- 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):
index df7d3b2..0237793 100644 (file)
@@ -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 @@ base32_decode_ctx_init (struct base32_decode_context *ctx)
    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 @@ get_8 (struct base32_decode_context *ctx,
    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)
 {
index 194e9ca..a328e1f 100644 (file)
@@ -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 @@ base64_decode_ctx_init (struct base64_decode_context *ctx)
    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 @@ get_4 (struct base64_decode_context *ctx,
    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)
 {
index 1eaa79a..4537dbf 100644 (file)
@@ -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 @@ AC_DEFUN([gl_FUNC_BASE32],
 
 # Prerequisites of lib/base32.c.
 AC_DEFUN([gl_PREREQ_BASE32], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])
index fa0c192..94ba62d 100644 (file)
@@ -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 @@ AC_DEFUN([gl_FUNC_BASE64],
 
 # Prerequisites of lib/base64.c.
 AC_DEFUN([gl_PREREQ_BASE64], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])