Commit 003f2644 authored by Thomas Roessler's avatar Thomas Roessler

Fix uint32_t portability problem. Reported by Steve Kennedy.

parent 686f53cf
......@@ -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 \
......
#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
......@@ -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 {
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment