[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-16-g064754bef
jonathan at claws-mail.org
jonathan at claws-mail.org
Mon Nov 28 05:57:07 CET 2022
The branch, gtk2 has been updated
via 064754beff2c7fd63f3a4986fd757e98dd57d587 (commit)
from a6bcc617056a8f6e54b3e723aeb8b12e85042ad6 (commit)
Summary of changes:
configure.ac | 1 -
m4/gnupg-check-typedef.m4 | 21 ---------------------
src/common/md5.c | 29 ++++++++++++++++++-----------
src/common/md5.h | 14 --------------
4 files changed, 18 insertions(+), 47 deletions(-)
delete mode 100644 m4/gnupg-check-typedef.m4
- Log -----------------------------------------------------------------
commit 064754beff2c7fd63f3a4986fd757e98dd57d587
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date: Sun Nov 27 14:36:49 2022 -0700
Replace u32 with guint32
diff --git a/configure.ac b/configure.ac
index 6bbc0fcb1..baa04522a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -451,7 +451,6 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
-GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned long, 4)
diff --git a/m4/gnupg-check-typedef.m4 b/m4/gnupg-check-typedef.m4
deleted file mode 100644
index 7e41cf05d..000000000
--- a/m4/gnupg-check-typedef.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME [, COMMENT])
-dnl Check whether a typedef exists and create a #define $2 if it exists
-dnl Copyright (C) 2003 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.
-dnl
-AC_DEFUN([GNUPG_CHECK_TYPEDEF],
- [ AC_MSG_CHECKING(for $1 typedef)
- AC_CACHE_VAL(gnupg_cv_typedef_$1,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
- #include <sys/types.h>]], [[
- #undef $1
- int a = sizeof($1);
- ]])],[gnupg_cv_typedef_$1=yes],[gnupg_cv_typedef_$1=no ])])
- AC_MSG_RESULT($gnupg_cv_typedef_$1)
- if test "$gnupg_cv_typedef_$1" = yes; then
- AC_DEFINE($2, 1, $3)
- fi
- ])
-
diff --git a/src/common/md5.c b/src/common/md5.c
index 611b9eaea..228231072 100644
--- a/src/common/md5.c
+++ b/src/common/md5.c
@@ -48,8 +48,8 @@
* Rotate a 32 bit integer by n bytes
*/
#if defined(__GNUC__) && defined(__i386__)
-static inline u32
-rol( u32 x, int n)
+static inline guint32
+rol( guint32 x, int n)
{
__asm__("roll %%cl,%0"
:"=r" (x)
@@ -60,6 +60,13 @@ rol( u32 x, int n)
#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
#endif
+typedef struct {
+ guint32 A,B,C,D;
+ guint32 nblocks;
+ unsigned char buf[64];
+ int count;
+ int finalized;
+} MD5_CONTEXT;
static void
md5_init(MD5_CONTEXT *ctx)
@@ -90,12 +97,12 @@ md5_init(MD5_CONTEXT *ctx)
static void
transform(MD5_CONTEXT *ctx, const unsigned char *data)
{
- u32 correct_words[16];
- u32 A = ctx->A;
- u32 B = ctx->B;
- u32 C = ctx->C;
- u32 D = ctx->D;
- u32 *cwp = correct_words;
+ guint32 correct_words[16];
+ guint32 A = ctx->A;
+ guint32 B = ctx->B;
+ guint32 C = ctx->C;
+ guint32 D = ctx->D;
+ guint32 *cwp = correct_words;
#ifdef BIG_ENDIAN_HOST
{
@@ -263,7 +270,7 @@ md5_update(MD5_CONTEXT *hd, const unsigned char *inbuf, size_t inlen)
static void
do_final(MD5_CONTEXT *hd)
{
- u32 t, msb, lsb;
+ guint32 t, msb, lsb;
unsigned char *p;
md5_update(hd, NULL, 0); /* flush */
@@ -309,10 +316,10 @@ do_final(MD5_CONTEXT *hd)
#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
*p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
#else /* little endian */
- /*#define X(a) do { *(u32*)p = hd->##a ; p += 4; } while(0)*/
+ /*#define X(a) do { *(guint32*)p = hd->##a ; p += 4; } while(0)*/
/* Unixware's cpp doesn't like the above construct so we do it his way:
* (reported by Allan Clark) */
-#define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
+#define X(a) do { *(guint32*)p = (*hd).a ; p += 4; } while(0)
#endif
X(A);
X(B);
diff --git a/src/common/md5.h b/src/common/md5.h
index bf82fd735..54ff3d6e5 100644
--- a/src/common/md5.h
+++ b/src/common/md5.h
@@ -23,20 +23,6 @@
#include "utils.h"
-#ifndef HAVE_U32_TYPEDEF
- #undef u32 /* maybe there is a macro with this name */
- typedef guint32 u32;
- #define HAVE_U32_TYPEDEF
-#endif
-
-typedef struct { /* Hmm, should be private */
- u32 A,B,C,D;
- u32 nblocks;
- unsigned char buf[64];
- int count;
- int finalized;
-} MD5_CONTEXT;
-
void md5_hex_digest(char *hexdigest, const unsigned char *s);
int md5_hex_digest_file(char *hexdigest, const unsigned char *file);
void md5_hex_hmac(char *hexdigest,
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list