2020-02-23 Bruno Haible <bruno@clisp.org>
+ crypto/sm3: Use 'restrict'.
+ * lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
+ * m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
+
crypto/*-buffer: Use 'restrict'.
* lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.
in first 32 bytes following RESBUF. The result is always in little
endian byte order, so that a byte-wise output yields to the wanted
ASCII representation of the message digest. */
-extern void *sm3_finish_ctx (struct sm3_ctx *ctx, void *resbuf);
+extern void *sm3_finish_ctx (struct sm3_ctx *ctx, void *restrict resbuf);
/* Put result from CTX in first 32 bytes following RESBUF. The result is
always in little endian byte order, so that a byte-wise output yields
to the wanted ASCII representation of the message digest. */
-extern void *sm3_read_ctx (const struct sm3_ctx *ctx, void *resbuf);
+extern void *sm3_read_ctx (const struct sm3_ctx *ctx, void *restrict resbuf);
/* Compute SM3 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
-extern void *sm3_buffer (const char *buffer, size_t len, void *resblock);
+extern void *sm3_buffer (const char *buffer, size_t len,
+ void *restrict resblock);
# endif
/* Compute SM3 message digest for bytes read from STREAM. The
-# sm3.m4 serial 1
+# sm3.m4 serial 2
dnl Copyright (C) 2017-2020 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_SM3],
[
+ dnl Prerequisites of lib/sm3.h.
+ AC_REQUIRE([AC_C_RESTRICT])
+
dnl Prerequisites of lib/sm3.c.
AC_REQUIRE([gl_BIGENDIAN])