diff --git a/src/prim/prim.c b/src/prim/prim.c index 83b7abc1..eec13c48 100644 --- a/src/prim/prim.c +++ b/src/prim/prim.c @@ -9,10 +9,10 @@ terms of the MIT license. A copy of the license can be found in the file // depending on the OS. #if defined(_WIN32) -#include "prim-windows.c" // VirtualAlloc (Windows) +#include "windows/prim.c" // VirtualAlloc (Windows) #elif defined(__wasi__) #define MI_USE_SBRK -#include "prim-wasi.h" // memory-grow or sbrk (Wasm) +#include "wasi/prim.h" // memory-grow or sbrk (Wasm) #else -#include "prim-unix.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.) +#include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.) #endif diff --git a/src/prim/prim-unix.c b/src/prim/unix/prim.c similarity index 99% rename from src/prim/prim-unix.c rename to src/prim/unix/prim.c index 997c0356..d1cd4301 100644 --- a/src/prim/prim-unix.c +++ b/src/prim/unix/prim.c @@ -5,6 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ +// This file is included in `src/prim/prim.c` + #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE // ensure mmap flags and syscall are defined #endif @@ -21,7 +23,7 @@ terms of the MIT license. A copy of the license can be found in the file #include "mimalloc.h" #include "mimalloc-internal.h" #include "mimalloc-atomic.h" -#include "prim.h" +#include "../prim.h" #include // mmap #include // sysconf diff --git a/src/prim/prim-wasi.c b/src/prim/wasi/prim.c similarity index 99% rename from src/prim/prim-wasi.c rename to src/prim/wasi/prim.c index f4d3be58..b8ac1a1b 100644 --- a/src/prim/prim-wasi.c +++ b/src/prim/wasi/prim.c @@ -5,10 +5,12 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ +// This file is included in `src/prim/prim.c` + #include "mimalloc.h" #include "mimalloc-internal.h" #include "mimalloc-atomic.h" -#include "prim.h" +#include "../prim.h" //--------------------------------------------- // Initialize diff --git a/src/prim/prim-windows.c b/src/prim/windows/prim.c similarity index 99% rename from src/prim/prim-windows.c rename to src/prim/windows/prim.c index 008b9fa4..2fa445a1 100644 --- a/src/prim/prim-windows.c +++ b/src/prim/windows/prim.c @@ -5,10 +5,12 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ +// This file is included in `src/prim/prim.c` + #include "mimalloc.h" #include "mimalloc-internal.h" #include "mimalloc-atomic.h" -#include "prim.h" +#include "../prim.h" #include // strerror #include // fputs, stderr