metal: ds4_os.hpp takes the macOS shim at the top of the file, not inside the Windows block

The include had landed between '#ifndef NOMINMAX' and '#include <windows.h>', so on a Mac it was never reached - that is why
the audit still showed every Linux name undeclared.  Moved after '#pragma once': ds4_model.cu goes from 20 to 15 errors.

The 15 left are four CPU_ZERO/CPU_SET uses (macOS has no cpu_set_t macros) and the __host__/__device__ qualifiers that
cuda_runtime.h does not define yet; both are a few lines and are the next step, then the Linux surface of the engine's
storage helpers is done.
This commit is contained in:
Niko1221 committed 2026-10-23 18:05:41 +02:00
1 parent 910af91838
commit bb60de0e8e
1 file changed
+4 -3
+4 -3
View File
@@ -6,6 +6,10 @@
// does it for GLM: no FILE_FLAG_RANDOM_ACCESS - the page cache must keep what it read.)
#pragma once
#if defined(__APPLE__)
#include "ds4_os_apple.h" // the Linux calls the body uses, on macOS
#endif
#include <algorithm>
#include <cstdint>
#include <cstdio>
@@ -18,9 +22,6 @@
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#if defined(__APPLE__)
#include "ds4_os_apple.h" // the Linux calls below, on macOS
#endif
#define NOMINMAX
#endif
#include <windows.h>