#ifndef _MD5_H
#define _MD5_H 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdio.h>
#if defined HAVE_LIMITS_H || _LIBC
# include <sys/types.h>
typedef u_int32_t md5_uint32;
typedef uintptr_t md5_uintptr;
+#elif defined (HAVE_SYS_TYPES_H) && defined (HAVE_STDINT_H)
+#include <stdint.h>
+#include <sys/types.h>
+typedef uint32_t md5_uint32;
+typedef uintptr_t md5_uintptr;
#else
# define INT_MAX_32_BITS 2147483647
typedef unsigned long int md5_uintptr;
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Structure to save state of computation between the single steps. */
struct md5_ctx
{