- Removed a bug with attempt to include pure c headers

- Added some more information about the license
 - fennec::file implementation
This commit is contained in:
2025-07-14 05:11:52 -04:00
parent 5e0dc78210
commit 6ae682aff6
26 changed files with 2229 additions and 245 deletions

View File

@@ -44,6 +44,19 @@ void* operator new[](fennec::size_t size, fennec::align_t align)
void* operator new (fennec::size_t size, fennec::align_t align, const fennec::nothrow_t&) { return _aligned_malloc(static_cast<size_t>(align), size); }
void* operator new[](fennec::size_t size, fennec::align_t align, const fennec::nothrow_t&) { return _aligned_malloc(static_cast<size_t>(align), size); }
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
namespace fennec
{
inline size_T pagesize() {
SYSTEM_INFO sysInfo;
GetSystemInfo(&sysInfo);
return sysInfo.dwPageSize;
}
}
#else
void operator delete (void* ptr) noexcept { ::free(ptr); }
@@ -76,4 +89,14 @@ void operator delete[](void* ptr, const fennec::nothrow_t&) noe
void operator delete (void* ptr, fennec::size_t, const fennec::nothrow_t&) noexcept { ::free(ptr); }
void operator delete[](void* ptr, fennec::size_t, const fennec::nothrow_t&) noexcept { ::free(ptr); }
#endif
#include <unistd.h>
namespace fennec
{
size_t pagesize() {
return sysconf(_SC_PAGESIZE);
}
}
#endif