Skip to content

Commit

Permalink
Support compiling with Pelles C (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaskalev committed Jun 14, 2024
1 parent 11f49ac commit 1b1345c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 11 additions & 0 deletions buddy_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b1345c

Please sign in to comment.