From 94b0f484e45f80688841294bb9f38987202c63dc Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Sat, 19 Sep 2026 13:16:13 +0200 Subject: [PATCH] Added support for macOS 27 --- .github/workflows/build.yml | 10 ++++++++-- README.md | 2 +- Tools/DFS/cli/cli.h | 15 ++------------- Tools/DFS/commlayer/EndpointClient.cpp | 5 +++-- Tools/DFS/commlayer/WebServer.cpp | 2 +- Tools/DFS/commlayer/comm.cpp | 5 +++-- .../DFS/datanode/DataNodeClientHandlerFactory.cpp | 1 - Tools/DFS/datanode/DataNodeClientHandlerFactory.h | 1 - Tools/DFS/shared/FigureSystem.cpp | 6 ++++-- Tools/DFS/shared/io.cpp | 2 +- Tools/DFS/shared/str.h | 1 + 11 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e88f9c911..5c7749d5e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,12 @@ on: branches: [main] pull_request: +# A new push to a PR cancels its older runs. Pushes to main get a unique +# group (the run id), so they are never cancelled or queued behind each other. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build-linux: strategy: @@ -563,9 +569,9 @@ jobs: strategy: fail-fast: false matrix: - # macos-15-intel = Intel (x86_64, /usr/local); macos-15 / macos-26 = + # macos-15-intel = Intel (x86_64, /usr/local); macos-26 / macos-27 = # Apple Silicon (arm64, /opt/homebrew). - os: ['macos-15-intel', 'macos-15', 'macos-26'] + os: ['macos-15-intel', 'macos-26', 'xcode-27' ] runs-on: ${{ matrix.os }} steps: - name: Checkout repo diff --git a/README.md b/README.md index bd56a30541..a371b6a41d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ clients concurrently. ## Quick start -Tested continuously on **Ubuntu 22.04 / 24.04 / 26.04** and **macOS 15 / 26** (Intel and Apple +Tested continuously on **Ubuntu 22.04 / 24.04 / 26.04** and **macOS 15 / 26 / 27** (Intel and Apple Silicon). Other Linux distributions generally work as well. On Ubuntu you can install a prebuilt package instead of building from source (replace `24.04` diff --git a/Tools/DFS/cli/cli.h b/Tools/DFS/cli/cli.h index f602498493..b04882d047 100644 --- a/Tools/DFS/cli/cli.h +++ b/Tools/DFS/cli/cli.h @@ -44,7 +44,6 @@ class Duration { timespec c; public: -#if (_POSIX_C_SOURCE >= 199309L) void start() { clock_gettime(CLOCK_REALTIME, &c); } @@ -52,19 +51,9 @@ class Duration { double measureMS() { timespec stopped; clock_gettime(CLOCK_REALTIME, &stopped); - return (stopped.tv_sec - c.tv_sec) + (stopped.tv_nsec - c.tv_nsec) - / 1E9; + return (stopped.tv_sec - c.tv_sec) * 1E3 + + (stopped.tv_nsec - c.tv_nsec) / 1E6; } -#else - void start(){ - - } - - double measureMS(){ - return -1.0; - } -#endif - }; diff --git a/Tools/DFS/commlayer/EndpointClient.cpp b/Tools/DFS/commlayer/EndpointClient.cpp index 0291d626c7..c94a7f7209 100644 --- a/Tools/DFS/commlayer/EndpointClient.cpp +++ b/Tools/DFS/commlayer/EndpointClient.cpp @@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include #include "RemoteCommandBuilder.h" @@ -120,8 +121,8 @@ Str EndpointClient::sendSyncMessage(URI uri, const Str &msg, bool doEnvelope) { } int ibufsize = buffersize; - char ibuf[ibufsize]; - bzero(ibuf, ibufsize); + std::vector ibufStorage(ibufsize); + char* ibuf = ibufStorage.data(); if (canDebug) debug("Hole Serveranwort..."); Str result; diff --git a/Tools/DFS/commlayer/WebServer.cpp b/Tools/DFS/commlayer/WebServer.cpp index c59f192398..6b3295bda6 100644 --- a/Tools/DFS/commlayer/WebServer.cpp +++ b/Tools/DFS/commlayer/WebServer.cpp @@ -121,7 +121,7 @@ void WebServer::listen() { ::listen(sockfd, 5); clilen = sizeof(cli_addr); - int bufsize = 65536; + const int bufsize = 65536; char buf[bufsize]; //auf clients warten diff --git a/Tools/DFS/commlayer/comm.cpp b/Tools/DFS/commlayer/comm.cpp index 1f80dd65ea..ebc71ea37b 100755 --- a/Tools/DFS/commlayer/comm.cpp +++ b/Tools/DFS/commlayer/comm.cpp @@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include using namespace std; @@ -109,8 +110,8 @@ void Endpoint::listen() { if (canDebug) debug("prepare data exchange with client"); - char buffer[bufsize]; - bzero(buffer, bufsize); + std::vector bufferStorage(bufsize); + char* buffer = bufferStorage.data(); Str input; int totalReceived = 0; if (canDebug) debug("fetching data from client"); diff --git a/Tools/DFS/datanode/DataNodeClientHandlerFactory.cpp b/Tools/DFS/datanode/DataNodeClientHandlerFactory.cpp index 548fe31137..699d75b633 100644 --- a/Tools/DFS/datanode/DataNodeClientHandlerFactory.cpp +++ b/Tools/DFS/datanode/DataNodeClientHandlerFactory.cpp @@ -35,7 +35,6 @@ DataNodeClientHandlerFactory::DataNodeClientHandlerFactory( const DataNode *dataNode, int maxHandlerCount, dfs::log::Logger *l) { this->maxHandlerCount = maxHandlerCount; this->logger = l; - // this->nodeState = nodeState; // self assignment: makes no sense this->dataNode = dataNode; this->freeHandlerId = 0; this->maxHandlerCount = 8; diff --git a/Tools/DFS/datanode/DataNodeClientHandlerFactory.h b/Tools/DFS/datanode/DataNodeClientHandlerFactory.h index 4fd5896fab..8d007179b7 100644 --- a/Tools/DFS/datanode/DataNodeClientHandlerFactory.h +++ b/Tools/DFS/datanode/DataNodeClientHandlerFactory.h @@ -45,7 +45,6 @@ namespace dfs { const DataNode *dataNode; DataNodeClientHandler *handlers; dfs::log::Logger *logger; - State *nodeState; void debug(const Str &s) { logger->debug(s); diff --git a/Tools/DFS/shared/FigureSystem.cpp b/Tools/DFS/shared/FigureSystem.cpp index f3efcc335b..1d886a6949 100644 --- a/Tools/DFS/shared/FigureSystem.cpp +++ b/Tools/DFS/shared/FigureSystem.cpp @@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "FigureSystem.h" +#include + using namespace dfs; const char *figures = "0123456789abcdefghijklmnopqrstuvwxyz"; @@ -69,12 +71,12 @@ void FigureSystem::refactor() { } Str FigureSystem::toStr() { - char tmp[base]; + std::vector tmp(length); for (int i = 0; i < length; i++) { unsigned char v = (unsigned char) values[i]; tmp[length - i - 1] = figures[v]; } - return Str(tmp, length); + return Str(tmp.data(), length); } void FigureSystem::fromStr(const Str &strValue) { diff --git a/Tools/DFS/shared/io.cpp b/Tools/DFS/shared/io.cpp index 5659a2b6b1..2dcc3b6fcd 100755 --- a/Tools/DFS/shared/io.cpp +++ b/Tools/DFS/shared/io.cpp @@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #if (_POSIX_C_SOURCE < 200112L) int posix_fallocate(int fd, off_t offset, off_t len){ - size_t bs = len<4096?len:4096; + const size_t bs = 4096; char buffer[bs]; memset(buffer, 0, bs); size_t remaining = len; diff --git a/Tools/DFS/shared/str.h b/Tools/DFS/shared/str.h index c56a6d107b..7ae1f4f349 100755 --- a/Tools/DFS/shared/str.h +++ b/Tools/DFS/shared/str.h @@ -427,6 +427,7 @@ namespace dfs { */ class SerializeAble { public: + virtual ~SerializeAble() {} virtual void serializeTo(ToStrSerializer &serializer) const = 0; };