epoc32/include/libc/limits.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 /**
    24  @file
    25  @publishedAll
    26  @released
    27 */
    28 
    29 #ifndef	_LIMITS_H_
    30 #define	_LIMITS_H_
    31 /**
    32 Number of bits in a `char'.	
    33 */
    34 #define	CHAR_BIT	8
    35 
    36 /**
    37 Maximum length of any multibyte character in any locale.
    38 Locale-writers should change this as necessary.  
    39 */
    40 #define	MB_LEN_MAX	2
    41 
    42 /**
    43 Minimum and maximum values a `signed char' can hold.  
    44 */
    45 #define	SCHAR_MIN	(-128)
    46 #define	SCHAR_MAX	127
    47 
    48 /**
    49 Maximum value an `unsigned char' can hold.  (Minimum is 0.)  
    50 */
    51 #define	UCHAR_MAX	255U
    52 
    53 /**
    54 Minimum and maximum values a `char' can hold.  
    55 The sign of "char" is probably dictated by a command-line switch to
    56 your compiler. 
    57 MSVC will define _CHAR_UNSIGNED if the /J option is used.
    58 GCC uses --unsigned-char (and friends) to override the default for
    59 the target processor and defines a symbol __CHAR_UNSIGNED__
    60 if appropriate.
    61 */
    62 #if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED) || ( defined (__ARMCC__) && !( __FEATURE_SIGNED_CHAR) )
    63 #define	CHAR_MIN	0
    64 #define	CHAR_MAX	UCHAR_MAX
    65 #else
    66 #define	CHAR_MIN	SCHAR_MIN
    67 #define	CHAR_MAX	SCHAR_MAX
    68 #endif
    69 
    70 /**
    71 Minimum and maximum values a `signed short int' can hold.  
    72 */
    73 #define	SHRT_MIN	(-32768)
    74 #define	SHRT_MAX	32767
    75 
    76 /**
    77 Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  
    78 */
    79 #define	USHRT_MAX	65535
    80 
    81 /**
    82 Minimum and maximum values a `signed int' can hold.  
    83 */
    84 #define	INT_MIN	(- INT_MAX - 1)
    85 #define	INT_MAX	2147483647
    86 
    87 /**
    88 Maximum value an `unsigned int' can hold.  (Minimum is 0.)  
    89 */
    90 #define	UINT_MAX	4294967295U
    91 
    92 /**
    93 Minimum and maximum values a `signed long int' can hold.  
    94 */
    95 #define	LONG_MIN	INT_MIN
    96 #define	LONG_MAX	INT_MAX
    97 
    98 /**
    99 Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  
   100 */
   101 #define	ULONG_MAX	UINT_MAX
   102 
   103 #endif	/* limits.h  */