X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fmy_inttypes.h;fp=src%2Fmy_inttypes.h;h=eec2ef5ef6c252d4cbe5d61e903b4882ee18af13;hb=85718e4dcaf5f34496f629e45a47ec91145c6f9e;hp=0000000000000000000000000000000000000000;hpb=abb2bffe08424d2d7e612f423815aeb7c79b42de;p=iptables.git diff --git a/src/my_inttypes.h b/src/my_inttypes.h new file mode 100644 index 0000000..eec2ef5 --- /dev/null +++ b/src/my_inttypes.h @@ -0,0 +1,51 @@ +/* + Copyright (C) Slava Astashonok + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License. + + $Id: my_inttypes.h,v 1.1.2.1 2004/08/13 20:41:19 sla Exp $ +*/ + +#ifndef _MY_INTTYPES_H_ +#define _MY_INTTYPES_H_ + +#include + +#ifdef HAVE_INTTYPES_H +#include +#else + +typedef unsigned char uint8_t; +typedef signed char int8_t; + +typedef unsigned short uint16_t; +typedef short int16_t; + +#if SIZEOF_INT == 4 +typedef unsigned int uint32_t; +typedef int int32_t; +#else +#if SIZEOF_LONG == 4 +typedef unsigned long uint32_t; +typedef long int32_t; +#else +#error "Can't find any 32 bit type" +#endif +#endif + +#if SIZEOF_LONG == 8 +typedef unsigned long uint64_t; +typedef long int64_t; +#else +#if SIZEOF_LONG_LONG == 8 +typedef unsigned long long uint64_t; +typedef long long int64_t; +#else +#error "Can't find any 64 bit type" +#endif +#endif + +#endif /* HAVE_INTTYPES_H */ + +#endif /* _MY_INTTYPES_H_ */