AmendHub

Download:

cyberslak

/

lightsout

/

amendments

/

9

dbuf: tweak va_copy stuff


cyberslak made amendment 9 25 days ago
--- dbuf.c Sat Mar 1 23:24:55 2025 +++ dbuf.c Sat Mar 8 02:44:16 2025 @@ -6,7 +6,9 @@ #include "util.h" // va_copy is C99 -#if !(__STDC_VERSION__) || __STDC_VERSION__ <= 199901L +// nevertheless, Codewarrior Pro 5 defines va_copy without advertising C99 support +// so check for both C99 support and defined(va_copy) +#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ <= 199901L) && !defined(va_copy) #define va_copy(dst, src) dst = src #endif --- dbuf.h Sat Mar 1 23:17:23 2025 +++ dbuf.h Sun Mar 9 22:24:55 2025 @@ -19,7 +19,6 @@ inline struct dbuf _db_new(size_t capacity) } // Unfortunately, pre-C99 we can't have an initializer list with xmalloc -// (In fact, you still can't, but you can have a compound expression) #define DB_INIT(name, capacity) \ struct dbuf name = _db_new(capacity)