os/ossrv/genericopenlibs/cstdlib/LINC/LIMITS.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINC/LIMITS.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,100 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedAll
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#ifndef	_LIMITS_H_
    1.30 +#define	_LIMITS_H_
    1.31 +/**
    1.32 +Number of bits in a `char'.	
    1.33 +*/
    1.34 +#define	CHAR_BIT	8
    1.35 +
    1.36 +/**
    1.37 +Maximum length of any multibyte character in any locale.
    1.38 +Locale-writers should change this as necessary.  
    1.39 +*/
    1.40 +#define	MB_LEN_MAX	2
    1.41 +
    1.42 +/**
    1.43 +Minimum and maximum values a `signed char' can hold.  
    1.44 +*/
    1.45 +#define	SCHAR_MIN	(-128)
    1.46 +#define	SCHAR_MAX	127
    1.47 +
    1.48 +/**
    1.49 +Maximum value an `unsigned char' can hold.  (Minimum is 0.)  
    1.50 +*/
    1.51 +#define	UCHAR_MAX	255U
    1.52 +
    1.53 +/**
    1.54 +Minimum and maximum values a `char' can hold.  
    1.55 +The sign of "char" is probably dictated by a command-line switch to
    1.56 +your compiler. 
    1.57 +MSVC will define _CHAR_UNSIGNED if the /J option is used.
    1.58 +GCC uses --unsigned-char (and friends) to override the default for
    1.59 +the target processor and defines a symbol __CHAR_UNSIGNED__
    1.60 +if appropriate.
    1.61 +*/
    1.62 +#if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED) || ( defined (__ARMCC__) && !( __FEATURE_SIGNED_CHAR) )
    1.63 +#define	CHAR_MIN	0
    1.64 +#define	CHAR_MAX	UCHAR_MAX
    1.65 +#else
    1.66 +#define	CHAR_MIN	SCHAR_MIN
    1.67 +#define	CHAR_MAX	SCHAR_MAX
    1.68 +#endif
    1.69 +
    1.70 +/**
    1.71 +Minimum and maximum values a `signed short int' can hold.  
    1.72 +*/
    1.73 +#define	SHRT_MIN	(-32768)
    1.74 +#define	SHRT_MAX	32767
    1.75 +
    1.76 +/**
    1.77 +Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  
    1.78 +*/
    1.79 +#define	USHRT_MAX	65535
    1.80 +
    1.81 +/**
    1.82 +Minimum and maximum values a `signed int' can hold.  
    1.83 +*/
    1.84 +#define	INT_MIN	(- INT_MAX - 1)
    1.85 +#define	INT_MAX	2147483647
    1.86 +
    1.87 +/**
    1.88 +Maximum value an `unsigned int' can hold.  (Minimum is 0.)  
    1.89 +*/
    1.90 +#define	UINT_MAX	4294967295U
    1.91 +
    1.92 +/**
    1.93 +Minimum and maximum values a `signed long int' can hold.  
    1.94 +*/
    1.95 +#define	LONG_MIN	INT_MIN
    1.96 +#define	LONG_MAX	INT_MAX
    1.97 +
    1.98 +/**
    1.99 +Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  
   1.100 +*/
   1.101 +#define	ULONG_MAX	UINT_MAX
   1.102 +
   1.103 +#endif	/* limits.h  */