/* 
 * Copyright 2011 Stefan Lankes, Chair for Operating Systems,
 *                               RWTH Aachen University
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * This file is part of MetalSVM.
 */

/**
 * author Stefan Lankes
 * @file arch/x86/include/asm/limits.h
 * @brief Define constants related to numerical value-ranges of variable types
 *
 * This file contains define constants for the numerical 
 * ranges of the most typical variable types.
 */

#ifndef __ARCH_LIMITS_H__
#define __ARCH_LIMITS_H__

#ifdef __cplusplus
extern "C" {
#endif

/** Number of bits in a char */
#define	CHAR_BIT	8		

/** Maximum value for a signed char */
#define	SCHAR_MAX	0x7f		
/** Minimum value for a signed char */
#define	SCHAR_MIN	(-0x7f - 1)	

/** Maximum value for an unsigned char */
#define	UCHAR_MAX	0xff		

/** Maximum value for an unsigned short */
#define	USHRT_MAX	0xffff		
/** Maximum value for a short */
#define	SHRT_MAX	0x7fff		
/** Minimum value for a short */
#define	SHRT_MIN	(-0x7fff - 1)	

/** Maximum value for an unsigned int */
#define	UINT_MAX	0xffffffffU	
/** Maximum value for an int */
#define	INT_MAX		0x7fffffff	
/** Minimum value for an int */
#define	INT_MIN	(-0x7fffffff - 1)	

/** Maximum value for an unsigned long */
#define	ULONG_MAX	0xffffffffUL	
/** Maximum value for a long */
#define	LONG_MAX	0x7fffffffL	
/** Minimum value for a long */
#define	LONG_MIN	(-0x7fffffffL - 1)	

/** Maximum value for an unsigned long long */
#define	ULLONG_MAX	0xffffffffffffffffULL
/** Maximum value for a long long */
#define	LLONG_MAX	0x7fffffffffffffffLL	
/** Minimum value for a long long */
#define	LLONG_MIN	(-0x7fffffffffffffffLL - 1)  

#ifdef __cplusplus
}
#endif

#endif