diff --git a/.github/workflows/netbsd.yml b/.github/workflows/terminal.yml similarity index 91% rename from .github/workflows/netbsd.yml rename to .github/workflows/terminal.yml index a7a77ae3..bf5ebc12 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/terminal.yml @@ -1,4 +1,4 @@ -name: Build +name: Terminal on: push: @@ -29,7 +29,7 @@ jobs: copyback: false prepare: | PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r | cut -d_ -f1)/All" /usr/sbin/pkg_add pkgin - pkgin -y in premake5 gmake SDL2-2.30.1 libpcap-1.10.4 + pkgin -y in premake5 gmake libpcap-1.10.4 run: | git config --global --add safe.directory $(pwd) premake5 --test gmake diff --git a/front/terminal/main.c b/front/terminal/main.c index e05180bf..56e7c379 100644 --- a/front/terminal/main.c +++ b/front/terminal/main.c @@ -21,6 +21,11 @@ // // 3. This notice may not be removed or altered from any source distribution. +/* The Mac OS X libc API selection is broken (tested with Xcode 15.0.1) */ +#ifndef __APPLE__ +#define _POSIX_C_SOURCE 2 /* select POSIX.2-1992 to expose popen & pclose */ +#endif + #include #include #include diff --git a/premake5.lua b/premake5.lua index 080e03a0..39a31086 100644 --- a/premake5.lua +++ b/premake5.lua @@ -277,6 +277,10 @@ workspace "virtualxt" if not _OPTIONS["no-modules"] and not _OPTIONS["dynamic"] then links(modules) + for _,f in ipairs(modules_link_callback) do + f() + filter {} + end end -- Perhaps move this to options? @@ -321,7 +325,7 @@ workspace "virtualxt" for _,f in ipairs(modules_link_callback) do f() filter {} - end + end end end @@ -371,13 +375,16 @@ workspace "virtualxt" dependson "modules" else links(modules) + for _,f in ipairs(modules_link_callback) do + f() + filter {} + end end end - defines { "_DEFAULT_SOURCE", "_XOPEN_SOURCE" } - files { "front/terminal/*.h", "front/terminal/*.c" } - includedirs { "lib/vxt/include", "lib/inih", "lib/termbox2", "front/common" } - links { "m", "vxt", "inih" } + files { "front/terminal/*.h", "front/terminal/*.c" } + includedirs { "lib/vxt/include", "lib/inih", "lib/termbox2", "front/common" } + links { "m", "vxt", "inih" } cleancommands { "{RMDIR} build/terminal", @@ -388,7 +395,7 @@ workspace "virtualxt" files { "tools/validator/pi8088/pi8088.c", "tools/validator/pi8088/udmask.h" } filter "toolset:clang or gcc" - buildoptions "-Wno-unused-parameter" + buildoptions { "-Wno-unused-parameter", "-Wno-implicit-function-declaration", "-Wno-incompatible-pointer-types" } linkoptions "-Wl,-rpath,'$$ORIGIN'/../lib" filter "toolset:clang"