]> granicus.if.org Git - mutt/commitdiff
Fix uint32_t portability problem. Reported by Steve Kennedy.
authorThomas Roessler <roessler@does-not-exist.org>
Sun, 8 Aug 2004 10:48:39 +0000 (10:48 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sun, 8 Aug 2004 10:48:39 +0000 (10:48 +0000)
Makefile.am
crypthash.h [new file with mode: 0644]
md5.h
sha1.h

index 4deadb0e071e54ec2f828c93671dcc4d3ac42470..0e0f8dbf98cfa48f3044758cc8fd9d1d581939a3 100644 (file)
@@ -67,7 +67,7 @@ EXTRA_mutt_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
 
 EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
        configure acconfig.h account.h \
-       attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs \
+       attach.h buffy.h charset.h copy.h crypthash.h dotlock.h functions.h gen_defs \
        globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
        mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
        mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
diff --git a/crypthash.h b/crypthash.h
new file mode 100644 (file)
index 0000000..a2545b8
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef _CRYPTHASH_H
+# define _CRYPTHASH_H
+
+# include "config.h"
+
+
+# include <sys/types.h>
+# if HAVE_INTTYPES_H
+#  include <inttypes.h>
+# else
+#  if HAVE_STDINT_H
+#   include <stdint.h>
+#  endif
+# endif
+
+/* POINTER defines a generic pointer type */
+typedef unsigned char *POINTER;
+
+# ifndef HAVE_UINT32_T
+#  if SIZEOF_INT == 4
+typedef unsigned int uint32_t;
+#  elif SIZEOF_LONG == 4
+typedef unsigned long uint32_t;
+#  endif
+# endif
+
+#endif
diff --git a/md5.h b/md5.h
index f825432366f8822b1870a203d0cf72950ba26bb2..521f3f5387b99ac802d95a6daea9fc0440c969c1 100644 (file)
--- a/md5.h
+++ b/md5.h
@@ -26,27 +26,7 @@ documentation and/or software.
 #ifndef MD5_H
 #define MD5_H 1
 
-#include "config.h"
-
-#include <sys/types.h>
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-/* POINTER defines a generic pointer type */
-typedef unsigned char *POINTER;
-
-#ifndef HAVE_UINT32_T
-#  if SIZEOF_INT == 4
-typedef unsigned int uint32_t;
-#  elif SIZEOF_LONG == 4
-typedef unsigned long int uint32_t;
-#  endif
-#endif
+#include "crypthash.h"
 
 /* MD5 context. */
 typedef struct {
diff --git a/sha1.h b/sha1.h
index 838195587c989dba20fa71d47556e891ce18400c..304beb93b2e21e1ebbfc4ec2096e8edbe60c73b6 100644 (file)
--- a/sha1.h
+++ b/sha1.h
@@ -9,24 +9,7 @@
 #ifndef _SHA1_H
 # define _SHA1_H
 
-#include "config.h"
-
-#include <sys/types.h>
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#ifndef HAVE_UINT32_T
-#  if SIZEOF_INT == 4
-typedef unsigned int uint32_t;
-#  elif SIZEOF_LONG == 4
-typedef unsigned long uint32_t;
-#  endif
-#endif
+#include "crypthash.h"
 
 typedef struct {
   uint32_t state[5];
@@ -47,4 +30,3 @@ void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
 # define SHA_DIGEST_LENGTH 20
 
 #endif
-