projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
radv: always initialize HTILE when the src layout is UNDEFINED
[mesa.git]
/
src
/
util
/
mesa-sha1.h
diff --git
a/src/util/mesa-sha1.h
b/src/util/mesa-sha1.h
index f927d5772dbfa0e39c7f0f92352a4272090820cb..bde50ba1eb4f5c97528d13314318178a5282d620 100644
(file)
--- a/
src/util/mesa-sha1.h
+++ b/
src/util/mesa-sha1.h
@@
-20,10
+20,11
@@
* DEALINGS IN THE SOFTWARE.
*/
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef SHA1_H
-#define SHA1_H
+#ifndef
MESA_
SHA1_H
+#define
MESA_
SHA1_H
#include <stdlib.h>
#include <stdlib.h>
+#include "c99_compat.h"
#include "sha1/sha1.h"
#ifdef __cplusplus
#include "sha1/sha1.h"
#ifdef __cplusplus
@@
-32,10
+33,17
@@
extern "C" {
#define mesa_sha1 _SHA1_CTX
#define mesa_sha1 _SHA1_CTX
-#define _mesa_sha1_init SHA1Init
+static inline void
+_mesa_sha1_init(struct mesa_sha1 *ctx)
+{
+ SHA1Init(ctx);
+}
-int
-_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size);
+static inline void
+_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, size_t size)
+{
+ SHA1Update(ctx, (const unsigned char *)data, size);
+}
static inline void
_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20])
static inline void
_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20])
@@
-43,7
+51,7
@@
_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20])
SHA1Final(result, ctx);
}
SHA1Final(result, ctx);
}
-char *
+void
_mesa_sha1_format(char *buf, const unsigned char *sha1);
void
_mesa_sha1_format(char *buf, const unsigned char *sha1);
void