alcyone/SDK/INC/CRT/stddef.h
Quinn Stephens 5c52adf492 [SDK] Big update
Signed-off-by: Quinn Stephens <quinn@osmora.org>
2025-06-11 20:00:34 -04:00

65 lines
940 B
C

/*++
Copyright (c) 2024-2025, Quinn Stephens.
Provided under the BSD 3-Clause license.
Module Name:
stddef.h
Abstract:
Provides standard types and definitions.
--*/
#pragma once
#ifndef _STDDEF_H
#define _STDDEF_H 1
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#if defined(__cplusplus) && __cplusplus >= 201103L
#define NULL nullptr
#elif defined(__cplusplus)
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef unsigned int size_t;
#endif
#endif
#ifndef _PTRDIFF_T_DEFINED
#define _PTRDIFF_T_DEFINED
#ifdef _WIN64
typedef __int64 ptrdiff_t;
#else
typedef long int ptrdiff_t;
#endif
#endif
#ifndef _WCHAR_T_DEFINED
#define _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#endif
#define offsetof(type, member) __builtin_offsetof(type, member)
#ifdef __cplusplus
}
#endif
#endif /* !_STDDEF_H */