diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-01-06 23:39:21 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-01-06 23:39:21 +0000 |
commit | 4ed68f73dae9e7621d7d7512b5feb686e9440bb2 (patch) | |
tree | 9646293b25a5a49b517d776baccce7ddff52a293 /src/stubs | |
parent | c3ecdf5caf17825b047e4d8b5d979986cbe380b0 (diff) |
Tidy up stubs, make vstdlib a stub, build on Linux
Important note: it doesn't WORK on Linux, and there's tons of warnings
and stuff, but it's easier to work on when all the compiler output and
whatnot is there.
Diffstat (limited to 'src/stubs')
-rw-r--r-- | src/stubs/stub.h | 13 | ||||
-rw-r--r-- | src/stubs/tier0.c | 9 | ||||
-rw-r--r-- | src/stubs/vstdlib.c | 7 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/stubs/stub.h b/src/stubs/stub.h new file mode 100644 index 0000000..75d377c --- /dev/null +++ b/src/stubs/stub.h @@ -0,0 +1,13 @@ +// We produce dummy libraries for vstdlib and tier0 to allow linking without +// dlsym faff. These macros are because Windows needs additional care because +// it's dumb. + +#ifdef _WIN32 +#define F(name) __declspec(dllexport) void name(void) {} +#define V(name) __declspec(dllexport) void *name; +#else +#define F(name) void *name; +#define V(name) void *name; +#endif + +// vi: sw=4 ts=4 noet tw=80 cc=80 diff --git a/src/stubs/tier0.c b/src/stubs/tier0.c new file mode 100644 index 0000000..2c9c578 --- /dev/null +++ b/src/stubs/tier0.c @@ -0,0 +1,9 @@ +/* This file is dedicated to the public domain. */ + +#include "stub.h" + +F(Msg) +F(Warning) +V(g_pMemAlloc) + +// vi: sw=4 ts=4 noet tw=80 cc=80 diff --git a/src/stubs/vstdlib.c b/src/stubs/vstdlib.c new file mode 100644 index 0000000..d3a63b0 --- /dev/null +++ b/src/stubs/vstdlib.c @@ -0,0 +1,7 @@ +/* This file is dedicated to the public domain. */ + +#include "stub.h" + +F(KeyValuesSystem) + +// vi: sw=4 ts=4 noet tw=80 cc=80 |