1367bebd4SEd Schouten /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3e58eb3c4SPedro F. Giffuni * 4367bebd4SEd Schouten * Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org> 5367bebd4SEd Schouten * All rights reserved. 6367bebd4SEd Schouten * 7367bebd4SEd Schouten * Redistribution and use in source and binary forms, with or without 8367bebd4SEd Schouten * modification, are permitted provided that the following conditions 9367bebd4SEd Schouten * are met: 10367bebd4SEd Schouten * 1. Redistributions of source code must retain the above copyright 11367bebd4SEd Schouten * notice, this list of conditions and the following disclaimer. 12367bebd4SEd Schouten * 2. Redistributions in binary form must reproduce the above copyright 13367bebd4SEd Schouten * notice, this list of conditions and the following disclaimer in the 14367bebd4SEd Schouten * documentation and/or other materials provided with the distribution. 15367bebd4SEd Schouten * 16367bebd4SEd Schouten * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17367bebd4SEd Schouten * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18367bebd4SEd Schouten * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19367bebd4SEd Schouten * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20367bebd4SEd Schouten * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21367bebd4SEd Schouten * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22367bebd4SEd Schouten * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23367bebd4SEd Schouten * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24367bebd4SEd Schouten * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25367bebd4SEd Schouten * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26367bebd4SEd Schouten * SUCH DAMAGE. 27367bebd4SEd Schouten * 28367bebd4SEd Schouten * $FreeBSD$ 29367bebd4SEd Schouten */ 30367bebd4SEd Schouten 31367bebd4SEd Schouten #ifndef __alignas_is_defined 32367bebd4SEd Schouten #define __alignas_is_defined 1 33367bebd4SEd Schouten 34367bebd4SEd Schouten #if !defined(__cplusplus) || __cplusplus < 201103L 35367bebd4SEd Schouten #include <sys/cdefs.h> 36367bebd4SEd Schouten #define alignas _Alignas 37367bebd4SEd Schouten #endif 38367bebd4SEd Schouten 39367bebd4SEd Schouten #endif /* !__alignas_is_defined */ 40367bebd4SEd Schouten 41367bebd4SEd Schouten #ifndef __alignof_is_defined 42367bebd4SEd Schouten #define __alignof_is_defined 1 43367bebd4SEd Schouten 44367bebd4SEd Schouten #if !defined(__cplusplus) || __cplusplus < 201103L 45367bebd4SEd Schouten #include <sys/cdefs.h> 46367bebd4SEd Schouten #define alignof _Alignof 47367bebd4SEd Schouten #endif 48367bebd4SEd Schouten 49367bebd4SEd Schouten #endif /* !__alignof_is_defined */ 50