1*0a6a1f1dSLionel Sambuc /* $NetBSD: int_const.h,v 1.4 2014/07/25 21:43:13 joerg Exp $ */ 2f6aac1c3SLionel Sambuc 3f6aac1c3SLionel Sambuc /*- 4f6aac1c3SLionel Sambuc * Copyright (c) 2001 The NetBSD Foundation, Inc. 5f6aac1c3SLionel Sambuc * All rights reserved. 6f6aac1c3SLionel Sambuc * 7f6aac1c3SLionel Sambuc * This code is derived from software contributed to The NetBSD Foundation 8f6aac1c3SLionel Sambuc * by Klaus Klein. 9f6aac1c3SLionel Sambuc * 10f6aac1c3SLionel Sambuc * Redistribution and use in source and binary forms, with or without 11f6aac1c3SLionel Sambuc * modification, are permitted provided that the following conditions 12f6aac1c3SLionel Sambuc * are met: 13f6aac1c3SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 14f6aac1c3SLionel Sambuc * notice, this list of conditions and the following disclaimer. 15f6aac1c3SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 16f6aac1c3SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 17f6aac1c3SLionel Sambuc * documentation and/or other materials provided with the distribution. 18f6aac1c3SLionel Sambuc * 19f6aac1c3SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20f6aac1c3SLionel Sambuc * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21f6aac1c3SLionel Sambuc * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22f6aac1c3SLionel Sambuc * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23f6aac1c3SLionel Sambuc * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24f6aac1c3SLionel Sambuc * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25f6aac1c3SLionel Sambuc * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26f6aac1c3SLionel Sambuc * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27f6aac1c3SLionel Sambuc * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28f6aac1c3SLionel Sambuc * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29f6aac1c3SLionel Sambuc * POSSIBILITY OF SUCH DAMAGE. 30f6aac1c3SLionel Sambuc */ 31f6aac1c3SLionel Sambuc 32f6aac1c3SLionel Sambuc #ifndef _ARM_INT_CONST_H_ 33f6aac1c3SLionel Sambuc #define _ARM_INT_CONST_H_ 34f6aac1c3SLionel Sambuc 35*0a6a1f1dSLionel Sambuc #ifdef __INTMAX_C_SUFFIX__ 36*0a6a1f1dSLionel Sambuc #include <sys/common_int_const.h> 37*0a6a1f1dSLionel Sambuc #else 38f6aac1c3SLionel Sambuc /* 39f6aac1c3SLionel Sambuc * 7.18.4 Macros for integer constants 40f6aac1c3SLionel Sambuc */ 41f6aac1c3SLionel Sambuc 42f6aac1c3SLionel Sambuc /* 7.18.4.1 Macros for minimum-width integer constants */ 43f6aac1c3SLionel Sambuc 44f6aac1c3SLionel Sambuc #define INT8_C(c) c 45f6aac1c3SLionel Sambuc #define INT16_C(c) c 46f6aac1c3SLionel Sambuc #define INT32_C(c) c 47f6aac1c3SLionel Sambuc #define INT64_C(c) c ## LL 48f6aac1c3SLionel Sambuc 49f6aac1c3SLionel Sambuc #define UINT8_C(c) c 50f6aac1c3SLionel Sambuc #define UINT16_C(c) c 51f6aac1c3SLionel Sambuc #define UINT32_C(c) c ## U 52f6aac1c3SLionel Sambuc #define UINT64_C(c) c ## ULL 53f6aac1c3SLionel Sambuc 54f6aac1c3SLionel Sambuc /* 7.18.4.2 Macros for greatest-width integer constants */ 55f6aac1c3SLionel Sambuc 56f6aac1c3SLionel Sambuc #define INTMAX_C(c) c ## LL 57f6aac1c3SLionel Sambuc #define UINTMAX_C(c) c ## ULL 58*0a6a1f1dSLionel Sambuc #endif 59f6aac1c3SLionel Sambuc 60f6aac1c3SLionel Sambuc #endif /* !_ARM_INT_CONST_H_ */ 61