From b03a0e8a669255f1f61e2f679d900640a3b2e8dc Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 28 Jun 2007 13:38:08 +0000 Subject: [PATCH] use inttypes.h to declare ints in uint*.h --- CHANGES | 1 + uint16.h | 6 ++++-- uint32.h | 6 ++++-- uint64.h | 6 ++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index c2e4b21..b4cf312 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ io_timeouted loop. (Dirk Engling) add some int overflow check macros to rangecheck.h fmt_ip6 compresses at best spot, not at first spot (Nikola Vladov) + use inttypes.h to declare ints in uint*.h 0.25: array_allocate no longer truncates the array diff --git a/uint16.h b/uint16.h index 2f363c9..b7726f3 100644 --- a/uint16.h +++ b/uint16.h @@ -1,8 +1,10 @@ #ifndef UINT16_H #define UINT16_H -typedef unsigned short uint16; -typedef signed short int16; +#include + +typedef uint16_t uint16; +typedef int16_t int16; #if defined(__i386__) && !defined(NO_UINT16_MACROS) #define uint16_pack(out,in) (*(uint16*)(out)=(in)) diff --git a/uint32.h b/uint32.h index cc9e143..8748f5c 100644 --- a/uint32.h +++ b/uint32.h @@ -1,8 +1,10 @@ #ifndef UINT32_H #define UINT32_H -typedef unsigned int uint32; -typedef signed int int32; +#include + +typedef uint32_t uint32; +typedef int32_t int32; #if defined(__i386__) && !defined(NO_UINT32_MACROS) #define uint32_pack(out,in) (*(uint32*)(out)=(in)) diff --git a/uint64.h b/uint64.h index f725c96..5209109 100644 --- a/uint64.h +++ b/uint64.h @@ -1,7 +1,9 @@ #ifndef UINT64_H #define UINT64_H -typedef unsigned long long uint64; -typedef signed long long int64; +#include + +typedef uint64_t uint64; +typedef int64_t int64; #endif