+#include <stddef.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/file.h>
#include <alloca.h>
+#include <stdlib.h>
/* Make the basic types 64-bit quantities on the host */
#define HOST_64_BIT long
-#ifndef DONTDECLARE_MALLOC
-extern PTR EXFUN(malloc,(unsigned));
-extern PTR EXFUN(realloc, (PTR, unsigned));
-#endif
-
-
-
-/* EXACT TYPES */
-typedef char int8e_type;
-typedef unsigned char uint8e_type;
-typedef short int16e_type;
-typedef unsigned short uint16e_type;
-typedef int int32e_type;
-typedef unsigned int uint32e_type;
-
-
typedef unsigned long uint64e_type;
-
-
-/* CORRECT SIZE OR GREATER */
-typedef char int8_type;
-typedef unsigned char uint8_type;
-typedef short int16_type;
-typedef unsigned short uint16_type;
-typedef int int32_type;
-typedef unsigned int uint32_type;
-
-
typedef unsigned long uint64_type;
typedef long int64_type;
-
#define BYTES_IN_PRINTF_INT 4
-#define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
-#define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
+/* These must have type unsigned long because they are used as
+ arguments in printf functions. */
+#define uint64_typeLOW(x) ((unsigned long) (((x) & 0xffffffff)))
+#define uint64_typeHIGH(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
+
#include "fopen-same.h"