# HG changeset patch # User Bruno Haible # Date 1201819075 -3600 # Node ID e9c2c3fc14fa078ec26a15c5d650343b950eb69b # Parent c219f369ca5e3da0802c0dc11e76c19a0f1da64c Mark set_uint32 function as 'inline'. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-31 Bruno Haible + + * lib/md4.c (set_uint32): Mark as inline. + * lib/md5.c (set_uint32): Likewise. + * lib/sha1.c (set_uint32): Likewise. + * m4/md4.m4 (gl_MD4): Require AC_C_INLINE. + * m4/md5.m4 (gl_MD5): Likewise. + * m4/sha1.m4 (gl_SHA1): Likewise. + 2008-01-31 Jim Meyering Use "sizeof VAR", rather than a literal "4". diff --git a/lib/md4.c b/lib/md4.c --- a/lib/md4.c +++ b/lib/md4.c @@ -67,7 +67,7 @@ /* 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 void +static inline void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); diff --git a/lib/md5.c b/lib/md5.c --- a/lib/md5.c +++ b/lib/md5.c @@ -83,7 +83,7 @@ /* 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 void +static inline void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); diff --git a/lib/sha1.c b/lib/sha1.c --- a/lib/sha1.c +++ b/lib/sha1.c @@ -70,7 +70,7 @@ /* 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 void +static inline void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); diff --git a/m4/md4.m4 b/m4/md4.m4 --- a/m4/md4.m4 +++ b/m4/md4.m4 @@ -1,5 +1,5 @@ -# md4.m4 serial 2 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# md4.m4 serial 3 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 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. @@ -10,4 +10,5 @@ dnl Prerequisites of lib/md4.c. AC_REQUIRE([AC_C_BIGENDIAN]) + AC_REQUIRE([AC_C_INLINE]) ]) diff --git a/m4/md5.m4 b/m4/md5.m4 --- a/m4/md5.m4 +++ b/m4/md5.m4 @@ -1,5 +1,5 @@ -# md5.m4 serial 9 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# md5.m4 serial 10 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 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. @@ -10,5 +10,6 @@ dnl Prerequisites of lib/md5.c. AC_REQUIRE([AC_C_BIGENDIAN]) + AC_REQUIRE([AC_C_INLINE]) : ]) diff --git a/m4/sha1.m4 b/m4/sha1.m4 --- a/m4/sha1.m4 +++ b/m4/sha1.m4 @@ -1,5 +1,5 @@ -# sha1.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# sha1.m4 serial 8 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 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. @@ -10,5 +10,6 @@ dnl Prerequisites of lib/sha1.c. AC_REQUIRE([AC_C_BIGENDIAN]) + AC_REQUIRE([AC_C_INLINE]) : ])