diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2021-11-20 03:10:50 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2021-11-20 03:18:08 +0000 |
commit | da6f343032cb01597dc7866e66f091adf3243a62 (patch) | |
tree | 870f8cb8e82bb42202ab92bea03fc6ab35ada7ca /src/intdefs.h |
Initial public snapshot
With code from Bill. Thanks Bill!
Diffstat (limited to 'src/intdefs.h')
-rw-r--r-- | src/intdefs.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/intdefs.h b/src/intdefs.h new file mode 100644 index 0000000..a3370d7 --- /dev/null +++ b/src/intdefs.h @@ -0,0 +1,35 @@ +/* This file is dedicated to the public domain. */ + +#ifndef INC_INTDEFS_H +#define INC_INTDEFS_H + +typedef signed char schar; +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef long long vlong; +typedef unsigned long long uvlong; + +typedef schar s8; +typedef uchar u8; +typedef short s16; +typedef ushort u16; +typedef int s32; +typedef uint u32; +typedef vlong s64; +typedef uvlong u64; + +// just in case there's ever a need to support 64-bit builds of Source, define a +// size type, since Windows isn't LP64 so (u)long won't quite do +#ifdef _WIN64 +typedef vlong ssize; +typedef uvlong usize; +#else +typedef long ssize; +typedef ulong usize; +#endif + +#endif + +// vi: sw=4 ts=4 noet tw=80 cc=80 |