1*d87708c5Sjoerg /* $NetBSD: int_const.h,v 1.5 2014/07/25 21:43:13 joerg Exp $ */ 281918bf8Sfvdl 381918bf8Sfvdl /*- 481918bf8Sfvdl * Copyright (c) 2001 The NetBSD Foundation, Inc. 581918bf8Sfvdl * All rights reserved. 681918bf8Sfvdl * 781918bf8Sfvdl * This code is derived from software contributed to The NetBSD Foundation 881918bf8Sfvdl * by Klaus Klein. 981918bf8Sfvdl * 1081918bf8Sfvdl * Redistribution and use in source and binary forms, with or without 1181918bf8Sfvdl * modification, are permitted provided that the following conditions 1281918bf8Sfvdl * are met: 1381918bf8Sfvdl * 1. Redistributions of source code must retain the above copyright 1481918bf8Sfvdl * notice, this list of conditions and the following disclaimer. 1581918bf8Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 1681918bf8Sfvdl * notice, this list of conditions and the following disclaimer in the 1781918bf8Sfvdl * documentation and/or other materials provided with the distribution. 1881918bf8Sfvdl * 1981918bf8Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2081918bf8Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2181918bf8Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2281918bf8Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2381918bf8Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2481918bf8Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2581918bf8Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2681918bf8Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2781918bf8Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2881918bf8Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2981918bf8Sfvdl * POSSIBILITY OF SUCH DAMAGE. 3081918bf8Sfvdl */ 3181918bf8Sfvdl 3281918bf8Sfvdl #ifndef _AMD64_INT_CONST_H_ 3381918bf8Sfvdl #define _AMD64_INT_CONST_H_ 3481918bf8Sfvdl 35*d87708c5Sjoerg #ifdef __INTMAX_C_SUFFIX__ 36*d87708c5Sjoerg #include <sys/common_int_const.h> 37*d87708c5Sjoerg #else 38*d87708c5Sjoerg 39433b5ddeSmrg #ifdef __x86_64__ 40433b5ddeSmrg 4181918bf8Sfvdl /* 4281918bf8Sfvdl * 7.18.4 Macros for integer constants 4381918bf8Sfvdl */ 4481918bf8Sfvdl 4581918bf8Sfvdl /* 7.18.4.1 Macros for minimum-width integer constants */ 4681918bf8Sfvdl 4781918bf8Sfvdl #define INT8_C(c) c 4881918bf8Sfvdl #define INT16_C(c) c 4981918bf8Sfvdl #define INT32_C(c) c 5081918bf8Sfvdl #define INT64_C(c) c ## L 5181918bf8Sfvdl 52dc71c99dStnozaki #define UINT8_C(c) c 53dc71c99dStnozaki #define UINT16_C(c) c 5481918bf8Sfvdl #define UINT32_C(c) c ## U 5581918bf8Sfvdl #define UINT64_C(c) c ## UL 5681918bf8Sfvdl 5781918bf8Sfvdl /* 7.18.4.2 Macros for greatest-width integer constants */ 5881918bf8Sfvdl 5981918bf8Sfvdl #define INTMAX_C(c) c ## L 6081918bf8Sfvdl #define UINTMAX_C(c) c ## UL 6181918bf8Sfvdl 62433b5ddeSmrg #else /* __x86_64__ */ 63433b5ddeSmrg 64433b5ddeSmrg #include <i386/int_const.h> 65433b5ddeSmrg 66433b5ddeSmrg #endif /* __x86_64__ */ 67433b5ddeSmrg 68*d87708c5Sjoerg #endif 69*d87708c5Sjoerg 7081918bf8Sfvdl #endif /* !_AMD64_INT_CONST_H_ */ 71