diff --git a/README.md b/README.md index b37d1c5..48ac597 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This is a buddy memory allocator that might be suitable for use in applications - 100% line and branch test coverage - Supports 32-bit and 64-bit platforms - Endian-agnostic, works on both LE and BE -- Compiles with GCC, Clang and MSVC +- Compiles with GCC, Clang, MSVC and Pelles C ## Usage diff --git a/buddy_alloc.h b/buddy_alloc.h index 1e827ce..b42c4c4 100644 --- a/buddy_alloc.h +++ b/buddy_alloc.h @@ -187,6 +187,17 @@ typedef signed long ssize_t; #define _SSIZE_T_DEFINED #endif +/* Support compiling with Pelles C */ +#if defined(__POCC__) && defined(__POCC_TARGET__) +#if __POCC_TARGET__ == 3 +typedef signed long long ssize_t; +#elif __POCC_TARGET__ == 1 +typedef signed long ssize_t; +#else +#error Uknown POCC target +#endif +#endif + #ifndef BUDDY_PRINTF #define BUDDY_PRINTF printf #endif