31 lines
785 B
C
31 lines
785 B
C
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// Minimal stddef.h for the W65816 runtime. Standalone (does not
|
|
// include the host clang's stddef.h).
|
|
|
|
#ifndef _STDDEF_H
|
|
#define _STDDEF_H
|
|
|
|
typedef unsigned long size_t;
|
|
typedef int ptrdiff_t;
|
|
// wchar_t is a built-in keyword in C++; only typedef in C.
|
|
#ifndef __cplusplus
|
|
#ifndef _WCHAR_T_DEFINED
|
|
# define _WCHAR_T_DEFINED
|
|
typedef int wchar_t; // matches clang builtin signature
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef NULL
|
|
# ifdef __cplusplus
|
|
# define NULL 0
|
|
# else
|
|
# define NULL ((void *)0)
|
|
# endif
|
|
#endif
|
|
|
|
#define offsetof(t, m) __builtin_offsetof(t, m)
|
|
|
|
#endif
|