X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fcatdoc.git;a=blobdiff_plain;f=src%2Fcatdoc.h;fp=src%2Fcatdoc.h;h=9f64c86105dd4603fc710221ff09e8c3416f7ecd;hp=b69a2d2af624d7abeccdaa37a8b4defe7cda635e;hb=d106443a3be63ce39f77b281eb80e85e54141e03;hpb=e2020c47c14a8a03f44734a6c0adc48fb5129c2f diff --git a/src/catdoc.h b/src/catdoc.h index b69a2d2..9f64c86 100644 --- a/src/catdoc.h +++ b/src/catdoc.h @@ -11,6 +11,24 @@ #include #endif +#ifdef HAVE_STDINT_H +#include +#else +/* If there is no stdint.h, lets define some common integer types + * ourselves */ +#define int16_t short int +#define uint16_t unsigned short int +#ifdef __MSDOS__ +/* MS-DOS is only supported platform where int is 16-bit */ +#define int32_t long int +#define uint32_t unsigned long int +#else +#define int32_t int +#define uint32_t unsigned int +#endif +#endif + + /* There is some strange thing on aix */ #if (defined(_AIX)||defined(___AIX)) && !defined(__unix) # define __unix 1 @@ -230,7 +248,7 @@ extern char *input_buffer,*output_buffer; char *strdup(const char *s); #endif /* numeric conversions */ -long int getlong(unsigned char *buffer,int offset); -unsigned long int getulong(unsigned char *buffer,int offset); -unsigned int getshort(unsigned char *buffer,int offset); +int32_t getlong(unsigned char *buffer,int offset); +uint32_t getulong(unsigned char *buffer,int offset); +uint16_t getshort(unsigned char *buffer,int offset); #endif