int_const.h revision 1.5
11.5Sjoerg/*	$NetBSD: int_const.h,v 1.5 2014/07/25 21:43:13 joerg Exp $	*/
21.1Sfvdl
31.1Sfvdl/*-
41.1Sfvdl * Copyright (c) 2001 The NetBSD Foundation, Inc.
51.1Sfvdl * All rights reserved.
61.1Sfvdl *
71.1Sfvdl * This code is derived from software contributed to The NetBSD Foundation
81.1Sfvdl * by Klaus Klein.
91.1Sfvdl *
101.1Sfvdl * Redistribution and use in source and binary forms, with or without
111.1Sfvdl * modification, are permitted provided that the following conditions
121.1Sfvdl * are met:
131.1Sfvdl * 1. Redistributions of source code must retain the above copyright
141.1Sfvdl *    notice, this list of conditions and the following disclaimer.
151.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright
161.1Sfvdl *    notice, this list of conditions and the following disclaimer in the
171.1Sfvdl *    documentation and/or other materials provided with the distribution.
181.1Sfvdl *
191.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Sfvdl * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Sfvdl * POSSIBILITY OF SUCH DAMAGE.
301.1Sfvdl */
311.1Sfvdl
321.1Sfvdl#ifndef _AMD64_INT_CONST_H_
331.1Sfvdl#define _AMD64_INT_CONST_H_
341.1Sfvdl
351.5Sjoerg#ifdef __INTMAX_C_SUFFIX__
361.5Sjoerg#include <sys/common_int_const.h>
371.5Sjoerg#else
381.5Sjoerg
391.3Smrg#ifdef __x86_64__
401.3Smrg
411.1Sfvdl/*
421.1Sfvdl * 7.18.4 Macros for integer constants
431.1Sfvdl */
441.1Sfvdl
451.1Sfvdl/* 7.18.4.1 Macros for minimum-width integer constants */
461.1Sfvdl
471.1Sfvdl#define	INT8_C(c)	c
481.1Sfvdl#define	INT16_C(c)	c
491.1Sfvdl#define	INT32_C(c)	c
501.1Sfvdl#define	INT64_C(c)	c ## L
511.1Sfvdl
521.4Stnozaki#define	UINT8_C(c)	c
531.4Stnozaki#define	UINT16_C(c)	c
541.1Sfvdl#define	UINT32_C(c)	c ## U
551.1Sfvdl#define	UINT64_C(c)	c ## UL
561.1Sfvdl
571.1Sfvdl/* 7.18.4.2 Macros for greatest-width integer constants */
581.1Sfvdl
591.1Sfvdl#define	INTMAX_C(c)	c ## L
601.1Sfvdl#define	UINTMAX_C(c)	c ## UL
611.1Sfvdl
621.3Smrg#else	/*	__x86_64__	*/
631.3Smrg
641.3Smrg#include <i386/int_const.h>
651.3Smrg
661.3Smrg#endif	/*	__x86_64__	*/
671.3Smrg
681.5Sjoerg#endif
691.5Sjoerg
701.1Sfvdl#endif /* !_AMD64_INT_CONST_H_ */
71