[ox/std] Fix ptrdiff_t header location
This commit is contained in:
parent
e7bf3d5413
commit
8f6897225a
2
deps/ox/src/ox/std/iterator.hpp
vendored
2
deps/ox/src/ox/std/iterator.hpp
vendored
@ -9,7 +9,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef OX_USE_STDLIB
|
#ifndef OX_USE_STDLIB
|
||||||
#include "types.hpp"
|
#include "stddef.hpp"
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
|
6
deps/ox/src/ox/std/stddef.hpp
vendored
6
deps/ox/src/ox/std/stddef.hpp
vendored
@ -8,10 +8,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.hpp"
|
||||||
|
|
||||||
#ifdef OX_USE_STDLIB
|
#ifdef OX_USE_STDLIB
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#else
|
#else
|
||||||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
using ptrdiff_t = uintptr_t;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
8
deps/ox/src/ox/std/types.hpp
vendored
8
deps/ox/src/ox/std/types.hpp
vendored
@ -160,10 +160,4 @@ static_assert(sizeof(uint8_t) == 1, "uint8_t is wrong size");
|
|||||||
static_assert(sizeof(uint16_t) == 2, "uint16_t is wrong size");
|
static_assert(sizeof(uint16_t) == 2, "uint16_t is wrong size");
|
||||||
static_assert(sizeof(uint32_t) == 4, "uint32_t is wrong size");
|
static_assert(sizeof(uint32_t) == 4, "uint32_t is wrong size");
|
||||||
static_assert(sizeof(uint64_t) == 8, "uint64_t is wrong size");
|
static_assert(sizeof(uint64_t) == 8, "uint64_t is wrong size");
|
||||||
static_assert(sizeof(uintptr_t) == sizeof(void*), "uintptr_t is wrong size");
|
static_assert(sizeof(uintptr_t) == sizeof(void*), "uintptr_t is wrong size");
|
||||||
|
|
||||||
#ifndef OX_USE_STDLIB
|
|
||||||
namespace std {
|
|
||||||
using ptrdiff_t = uintptr_t;
|
|
||||||
}
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue
Block a user