use inttypes.h to declare ints in uint*.h

master
leitner 18 years ago
parent b2be335043
commit b03a0e8a66

@ -5,6 +5,7 @@
io_timeouted loop. (Dirk Engling) io_timeouted loop. (Dirk Engling)
add some int overflow check macros to rangecheck.h add some int overflow check macros to rangecheck.h
fmt_ip6 compresses at best spot, not at first spot (Nikola Vladov) fmt_ip6 compresses at best spot, not at first spot (Nikola Vladov)
use inttypes.h to declare ints in uint*.h
0.25: 0.25:
array_allocate no longer truncates the array array_allocate no longer truncates the array

@ -1,8 +1,10 @@
#ifndef UINT16_H #ifndef UINT16_H
#define UINT16_H #define UINT16_H
typedef unsigned short uint16; #include <inttypes.h>
typedef signed short int16;
typedef uint16_t uint16;
typedef int16_t int16;
#if defined(__i386__) && !defined(NO_UINT16_MACROS) #if defined(__i386__) && !defined(NO_UINT16_MACROS)
#define uint16_pack(out,in) (*(uint16*)(out)=(in)) #define uint16_pack(out,in) (*(uint16*)(out)=(in))

@ -1,8 +1,10 @@
#ifndef UINT32_H #ifndef UINT32_H
#define UINT32_H #define UINT32_H
typedef unsigned int uint32; #include <inttypes.h>
typedef signed int int32;
typedef uint32_t uint32;
typedef int32_t int32;
#if defined(__i386__) && !defined(NO_UINT32_MACROS) #if defined(__i386__) && !defined(NO_UINT32_MACROS)
#define uint32_pack(out,in) (*(uint32*)(out)=(in)) #define uint32_pack(out,in) (*(uint32*)(out)=(in))

@ -1,7 +1,9 @@
#ifndef UINT64_H #ifndef UINT64_H
#define UINT64_H #define UINT64_H
typedef unsigned long long uint64; #include <inttypes.h>
typedef signed long long int64;
typedef uint64_t uint64;
typedef int64_t int64;
#endif #endif

Loading…
Cancel
Save