xref: /openbsd-src/libexec/tradcpp/union.h (revision f9343feac8314427583210aa64cbdde958db9030)
1*f9343feaSjsg /*-
2*f9343feaSjsg  * Copyright (c) 2015 The NetBSD Foundation, Inc.
3*f9343feaSjsg  * All rights reserved.
4*f9343feaSjsg  *
5*f9343feaSjsg  * This code is derived from software contributed to The NetBSD Foundation
6*f9343feaSjsg  * by David A. Holland.
7*f9343feaSjsg  *
8*f9343feaSjsg  * Redistribution and use in source and binary forms, with or without
9*f9343feaSjsg  * modification, are permitted provided that the following conditions
10*f9343feaSjsg  * are met:
11*f9343feaSjsg  * 1. Redistributions of source code must retain the above copyright
12*f9343feaSjsg  *    notice, this list of conditions and the following disclaimer.
13*f9343feaSjsg  * 2. Redistributions in binary form must reproduce the above copyright
14*f9343feaSjsg  *    notice, this list of conditions and the following disclaimer in the
15*f9343feaSjsg  *    documentation and/or other materials provided with the distribution.
16*f9343feaSjsg  *
17*f9343feaSjsg  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18*f9343feaSjsg  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19*f9343feaSjsg  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20*f9343feaSjsg  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21*f9343feaSjsg  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22*f9343feaSjsg  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23*f9343feaSjsg  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*f9343feaSjsg  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25*f9343feaSjsg  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26*f9343feaSjsg  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27*f9343feaSjsg  * POSSIBILITY OF SUCH DAMAGE.
28*f9343feaSjsg  */
29*f9343feaSjsg 
30*f9343feaSjsg #if defined(__clang__) || defined(__GNUC__) || __STDC__ > 201101
31*f9343feaSjsg #define UN
32*f9343feaSjsg #undef NEED_UNION_ACCESSORS
33*f9343feaSjsg #else
34*f9343feaSjsg #define UN un
35*f9343feaSjsg #define NEED_UNION_ACCESSORS
36*f9343feaSjsg #endif
37