xref: /freebsd/tools/build/stddef.h (revision 0c075db78a98de8e3a255597d045bcd24ba27be7)
189c3ae5fSBrooks Davis /*-
289c3ae5fSBrooks Davis  * SPDX-License-Identifier: BSD-2-Clause
389c3ae5fSBrooks Davis  *
489c3ae5fSBrooks Davis  * Copyright 2018-2020 Alex Richardson <arichardson@FreeBSD.org>
589c3ae5fSBrooks Davis  *
689c3ae5fSBrooks Davis  * This software was developed by SRI International and the University of
789c3ae5fSBrooks Davis  * Cambridge Computer Laboratory (Department of Computer Science and
889c3ae5fSBrooks Davis  * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the
989c3ae5fSBrooks Davis  * DARPA SSITH research programme.
1089c3ae5fSBrooks Davis  *
1189c3ae5fSBrooks Davis  * This software was developed by SRI International and the University of
1289c3ae5fSBrooks Davis  * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
1389c3ae5fSBrooks Davis  * ("CTSRD"), as part of the DARPA CRASH research programme.
1489c3ae5fSBrooks Davis  *
1589c3ae5fSBrooks Davis  * This work was supported by Innovate UK project 105694, "Digital Security by
1689c3ae5fSBrooks Davis  * Design (DSbD) Technology Platform Prototype".
1789c3ae5fSBrooks Davis  *
1889c3ae5fSBrooks Davis  * Redistribution and use in source and binary forms, with or without
1989c3ae5fSBrooks Davis  * modification, are permitted provided that the following conditions
2089c3ae5fSBrooks Davis  * are met:
2189c3ae5fSBrooks Davis  * 1. Redistributions of source code must retain the above copyright
2289c3ae5fSBrooks Davis  *    notice, this list of conditions and the following disclaimer.
2389c3ae5fSBrooks Davis  * 2. Redistributions in binary form must reproduce the above copyright
2489c3ae5fSBrooks Davis  *    notice, this list of conditions and the following disclaimer in the
2589c3ae5fSBrooks Davis  *    documentation and/or other materials provided with the distribution.
2689c3ae5fSBrooks Davis  *
2789c3ae5fSBrooks Davis  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2889c3ae5fSBrooks Davis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2989c3ae5fSBrooks Davis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3089c3ae5fSBrooks Davis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3189c3ae5fSBrooks Davis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3289c3ae5fSBrooks Davis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3389c3ae5fSBrooks Davis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3489c3ae5fSBrooks Davis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3589c3ae5fSBrooks Davis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3689c3ae5fSBrooks Davis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3789c3ae5fSBrooks Davis  * SUCH DAMAGE.
3889c3ae5fSBrooks Davis  */
39*0c075db7SAhmad Khalifa 
40*0c075db7SAhmad Khalifa /*
41*0c075db7SAhmad Khalifa  * The header guard is left out on purpose here. Both clang and gcc's
42*0c075db7SAhmad Khalifa  * stddef.h are designed to be included multiple times with different
43*0c075db7SAhmad Khalifa  * combinations of __need_* macros defined (e.g __need_size_t).
44*0c075db7SAhmad Khalifa  */
45*0c075db7SAhmad Khalifa 
4689c3ae5fSBrooks Davis #include_next <stddef.h>
4789c3ae5fSBrooks Davis 
4889c3ae5fSBrooks Davis #ifndef _PTRADDR_T_DECLARED
4989c3ae5fSBrooks Davis #ifdef __PTRADDR_TYPE__
5089c3ae5fSBrooks Davis typedef	__PTRADDR_TYPE__	ptraddr_t;
5189c3ae5fSBrooks Davis #else
52*0c075db7SAhmad Khalifa /*
53*0c075db7SAhmad Khalifa  * If anything other than __need_size_t is defined (see above), we won't
54*0c075db7SAhmad Khalifa  * have size_t. Use __SIZE_TYPE__ instead.
55*0c075db7SAhmad Khalifa  */
56*0c075db7SAhmad Khalifa typedef	__SIZE_TYPE__		ptraddr_t;
5789c3ae5fSBrooks Davis #endif
5889c3ae5fSBrooks Davis #define _PTRADDR_T_DECLARED
5989c3ae5fSBrooks Davis #endif
60