]> Savannah Git Hosting - gnulib.git/commitdiff
arctwo, md4, md5, sha1, sha256, sha512: no 'static 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:54 +0000 (23:38 -0800)
* lib/arctwo.c (to_uchar):
* lib/md4.c (set_uint32):
* lib/md5.c (set_uint32):
* lib/sha1.c (set_uint32):
* lib/sha256.c (set_uint32):
* lib/sha512.c (set_uint64):
Now static, not static inline.  This is a bit simpler, and doesn't
affect performance with GCC and default optimization.
* m4/arctwo.m4 (gl_ARCTWO):
* m4/md4.m4 (gl_MD4):
* m4/md5.m4 (gl_MD5):
* m4/sha1.m4 (gl_SHA1):
* m4/sha256.m4 (gl_SHA256):
* m4/sha512.m4 (gl_SHA512):
Do not require AC_C_INLINE.

13 files changed:
ChangeLog
lib/arctwo.c
lib/md4.c
lib/md5.c
lib/sha1.c
lib/sha256.c
lib/sha512.c
m4/arctwo.m4
m4/md4.m4
m4/md5.m4
m4/sha1.m4
m4/sha256.m4
m4/sha512.m4

index 8418c3b49f443d69e1b0e94d2608918138033294..fadcdfe2136ded9b1b8349392e2dbcf23d21da29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
 
+       arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
+       * lib/arctwo.c (to_uchar):
+       * lib/md4.c (set_uint32):
+       * lib/md5.c (set_uint32):
+       * lib/sha1.c (set_uint32):
+       * lib/sha256.c (set_uint32):
+       * lib/sha512.c (set_uint64):
+       Now static, not static inline.  This is a bit simpler, and doesn't
+       affect performance with GCC and default optimization.
+       * m4/arctwo.m4 (gl_ARCTWO):
+       * m4/md4.m4 (gl_MD4):
+       * m4/md5.m4 (gl_MD5):
+       * m4/sha1.m4 (gl_SHA1):
+       * m4/sha256.m4 (gl_SHA256):
+       * m4/sha512.m4 (gl_SHA512):
+       Do not require AC_C_INLINE.
+
        cond, lock, thread: better 'inline'
        * lib/glthread/cond.c, lib/glthread/cond.h (_GLTHREAD_COND_INLINE):
        * lib/glthread/thread.c, lib/glthread/thread.h (_GLTHREAD_THREAD_INLINE):
index 4404936da47edd3e884da890635a5ca9a2a33301..4cdef6f62a188f1d79a292e1dc3046fdb39e5d16 100644 (file)
@@ -67,7 +67,7 @@ static const uint8_t arctwo_sbox[] = {
 };
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
index 3d1c369ed4c7f0147fe492cfaff7e0ff49dc7239..ccdaa8bd8242ec08a778dc40ec4f797f4684e0c8 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -67,7 +67,7 @@ md4_init_ctx (struct md4_ctx *ctx)
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
index 66ede23b58a5bd208d830958f9dd4b869c703513..3f564d139f131e3f2dc8e8828952e1ccf164c80a 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -83,7 +83,7 @@ md5_init_ctx (struct md5_ctx *ctx)
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
index db4ab42a6a94b619469a8fcc4154f8b91362f8ee..1f67184ffc88e3f7b438344f4370f812ca766c2f 100644 (file)
@@ -70,7 +70,7 @@ sha1_init_ctx (struct sha1_ctx *ctx)
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
index a8d29da18ddfe6536f1444ce8d9ffb2ccfb94cb5..55273c6a3bc3de4152e5339a224597fe5f152e84 100644 (file)
@@ -90,7 +90,7 @@ sha224_init_ctx (struct sha256_ctx *ctx)
 /* Copy the value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
index cf62f2034e519e58d7d0fd462c370237b4c9ff86..dfb67a305d8551472d9cf7a09a83171e751b616d 100644 (file)
@@ -97,7 +97,7 @@ sha384_init_ctx (struct sha512_ctx *ctx)
 /* Copy the value from V into the memory location pointed to by *CP,
    If your architecture allows unaligned access, this is equivalent to
    * (__typeof__ (v) *) cp = v  */
-static inline void
+static void
 set_uint64 (char *cp, u64 v)
 {
   memcpy (cp, &v, sizeof v);
index dc04161f02ee582c62d41505e5048043b8fc2a19..c3c71249a14a1a48ff7089e3acf08b9685901dfe 100644 (file)
@@ -1,12 +1,8 @@
-# arctwo.m4 serial 4
+# arctwo.m4 serial 5
 dnl Copyright (C) 2005-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,
 dnl with or without modifications, as long as this notice is preserved.
 
 # Prerequisites of lib/arctwo.c.
-AC_DEFUN([gl_ARCTWO],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_ARCTWO], [:])
index 43cd46af10ea3632a3b83a5b598047c079afc998..8e1c2799934e35bb9f3336e7547311ebf0fdd0bd 100644 (file)
--- a/m4/md4.m4
+++ b/m4/md4.m4
@@ -1,4 +1,4 @@
-# md4.m4 serial 6
+# md4.m4 serial 7
 dnl Copyright (C) 2002-2006, 2008-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,
@@ -8,6 +8,5 @@ dnl Prerequisites of lib/md4.c.
 AC_DEFUN([gl_MD4],
 [
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
index e22f7bdb17ae5beab160e08e8b5747a0cffae513..85ed8946068e7ce6fa45c99c727c8bad0de5818f 100644 (file)
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -1,4 +1,4 @@
-# md5.m4 serial 12
+# md5.m4 serial 13
 dnl Copyright (C) 2002-2006, 2008-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,
@@ -8,6 +8,5 @@ AC_DEFUN([gl_MD5],
 [
   dnl Prerequisites of lib/md5.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
index 76198258b92c2045b44b06e82b8385f5d688f427..29fa4850341bebe8dfe0160492ac03e0c9c34fa5 100644 (file)
@@ -1,4 +1,4 @@
-# sha1.m4 serial 10
+# sha1.m4 serial 11
 dnl Copyright (C) 2002-2006, 2008-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,
@@ -8,6 +8,5 @@ AC_DEFUN([gl_SHA1],
 [
   dnl Prerequisites of lib/sha1.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
index 78cc95ed8b6b3f7c7a3af1706e723d64f0fdc0e2..f75a7fb9e07917dd09005980755d9e17fa669015 100644 (file)
@@ -1,4 +1,4 @@
-# sha256.m4 serial 5
+# sha256.m4 serial 6
 dnl Copyright (C) 2005, 2008-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,
@@ -8,5 +8,4 @@ AC_DEFUN([gl_SHA256],
 [
   dnl Prerequisites of lib/sha256.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
 ])
index 937ea8d5e9dd1865bd5d9e7547bbb67d908ff0d7..e6e27393d7d5445e3287d88e028d9e7a7f1d9c48 100644 (file)
@@ -1,4 +1,4 @@
-# sha512.m4 serial 6
+# sha512.m4 serial 7
 dnl Copyright (C) 2005-2006, 2008-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,
@@ -8,5 +8,4 @@ AC_DEFUN([gl_SHA512],
 [
   dnl Prerequisites of lib/sha512.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
 ])