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):
};
/* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
to_uchar (char ch)
{
return ch;
/* 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);
/* 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);
/* 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);
/* 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);
/* 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);
-# 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], [:])
-# 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,
AC_DEFUN([gl_MD4],
[
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
:
])
-# 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,
[
dnl Prerequisites of lib/md5.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
:
])
-# 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,
[
dnl Prerequisites of lib/sha1.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
:
])
-# 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,
[
dnl Prerequisites of lib/sha256.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
])
-# 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,
[
dnl Prerequisites of lib/sha512.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
])