Add a DJGPP CMake toolchain file and DOS compatibility layer (err.h, fnmatch, getprogname/setprogname) so UC2 builds as a native DOS executable via cross-compilation from Linux. The toolchain works around a baked-in /usr/include in the DJGPP GCC binary by using -I instead of -isystem to ensure DJGPP headers take precedence. Add GitHub Actions CI workflow that builds and smoke-tests on both ubuntu-latest and macos-latest.
19 lines
520 B
C
19 lines
520 B
C
#ifndef _ERR_H
|
|
#define _ERR_H
|
|
#ifdef __GNUC__
|
|
#define err_noreturn __attribute__((noreturn))
|
|
//#define err_noreturn [[noreturn]]
|
|
#else
|
|
#define err_noreturn
|
|
#endif
|
|
err_noreturn void err(int x, const char* f, ...);
|
|
err_noreturn void errx(int x, const char* f, ...);
|
|
void warn(const char* f, ...);
|
|
void warnx(const char* f, ...);
|
|
#include <stdarg.h>
|
|
void verr(int x, const char* f, va_list a);
|
|
void verrx(int x, const char* f, va_list a);
|
|
void vwarn(const char* f, va_list a);
|
|
void vwarnx(const char* f, va_list a);
|
|
#endif
|