# HG changeset patch # User Mike Becker # Date 1675796925 -3600 # Node ID 77021e06b1a84fcebe3bac5ed57eb4489d60428c # Parent 12c2b10b51a9e8bff22a9f47bd7d0c46b3f998e6 fix code not compiling under windows+mingw diff -r 12c2b10b51a9 -r 77021e06b1a8 src/allocator.c --- a/src/allocator.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/allocator.c Tue Feb 07 20:08:45 2023 +0100 @@ -28,8 +28,6 @@ #include "cx/allocator.h" -#include - __attribute__((__malloc__, __alloc_size__(2))) static void *cx_malloc_stdlib( __attribute__((__unused__)) void *d, diff -r 12c2b10b51a9 -r 77021e06b1a8 src/array_list.c --- a/src/array_list.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/array_list.c Tue Feb 07 20:08:45 2023 +0100 @@ -29,7 +29,6 @@ #include "cx/array_list.h" #include #include -#include // LOW LEVEL ARRAY LIST FUNCTIONS diff -r 12c2b10b51a9 -r 77021e06b1a8 src/basic_mempool.c --- a/src/basic_mempool.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/basic_mempool.c Tue Feb 07 20:08:45 2023 +0100 @@ -28,7 +28,6 @@ #include "cx/basic_mempool.h" #include "cx/utils.h" -#include #include #define of_chk_(n) if (SIZE_MAX - sizeof(cx_destructor_func) < (n)) return NULL diff -r 12c2b10b51a9 -r 77021e06b1a8 src/buffer.c --- a/src/buffer.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/buffer.c Tue Feb 07 20:08:45 2023 +0100 @@ -29,10 +29,8 @@ #include "cx/buffer.h" #include "cx/utils.h" -#include #include #include -#include int cxBufferInit( CxBuffer *buffer, diff -r 12c2b10b51a9 -r 77021e06b1a8 src/compare.c --- a/src/compare.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/compare.c Tue Feb 07 20:08:45 2023 +0100 @@ -28,7 +28,6 @@ #include "cx/compare.h" -#include #include int cx_cmp_int(void const *i1, void const *i2) { diff -r 12c2b10b51a9 -r 77021e06b1a8 src/cx/common.h --- a/src/cx/common.h Tue Feb 07 20:08:08 2023 +0100 +++ b/src/cx/common.h Tue Feb 07 20:08:45 2023 +0100 @@ -92,6 +92,7 @@ #include #include #include +#include /** * Function pointer compatible with fwrite-like functions. @@ -104,12 +105,15 @@ ); #ifdef _WIN32 +#ifdef __MINGW32__ +#include +#endif // __MINGW32__ #ifndef __WORDSIZE #ifdef _WIN64 #define __WORDSIZE 64 #else #define __WORDSIZE 32 -#endif +#endif // _WIN64 #endif // __WORDSIZE #else // !_WIN32 diff -r 12c2b10b51a9 -r 77021e06b1a8 src/cx/compare.h --- a/src/cx/compare.h Tue Feb 07 20:08:08 2023 +0100 +++ b/src/cx/compare.h Tue Feb 07 20:08:45 2023 +0100 @@ -37,6 +37,8 @@ #ifndef UCX_COMPARE_H #define UCX_COMPARE_H +#include "common.h" + #ifdef __cplusplus extern "C" { #endif diff -r 12c2b10b51a9 -r 77021e06b1a8 src/linked_list.c --- a/src/linked_list.c Tue Feb 07 20:08:08 2023 +0100 +++ b/src/linked_list.c Tue Feb 07 20:08:45 2023 +0100 @@ -28,7 +28,6 @@ #include "cx/linked_list.h" #include "cx/utils.h" -#include #include #include diff -r 12c2b10b51a9 -r 77021e06b1a8 test/test_compare.cpp --- a/test/test_compare.cpp Tue Feb 07 20:08:08 2023 +0100 +++ b/test/test_compare.cpp Tue Feb 07 20:08:45 2023 +0100 @@ -87,7 +87,7 @@ } TEST(Compare, Uint) { - test_compare(cx_cmp_uint); + test_compare(cx_cmp_uint); } TEST(Compare, Ulongint) {