2015-04-11 07:44:37 +08:00
|
|
|
/* limits.h */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INC_limits_h__
|
|
|
|
#define __INC_limits_h__
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#define UCHAR_MAX 0xFF
|
|
|
|
#define SCHAR_MAX 0x7F
|
|
|
|
#define SCHAR_MIN (-SCHAR_MAX - 1)
|
|
|
|
|
|
|
|
#ifdef __CHAR_UNSIGNED__
|
|
|
|
/* 'char' is an unsigned type */
|
|
|
|
#define CHAR_MAX UCHAR_MAX
|
|
|
|
#define CHAR_MIN 0
|
|
|
|
#else
|
|
|
|
/* 'char' is a signed type */
|
|
|
|
#define CHAR_MAX SCHAR_MAX
|
|
|
|
#define CHAR_MIN SCHAR_MIN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CHAR_BIT 8
|
|
|
|
#define LONG_BIT 32
|
|
|
|
#define WORD_BIT 32
|
|
|
|
|
|
|
|
#define INT_MAX 0x7FFFFFFF
|
|
|
|
#define SHRT_MAX 0x7FFF
|
2018-08-16 07:43:38 +08:00
|
|
|
#define LONG_MAX 0x7FFFFFFFL
|
|
|
|
#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
#define INT_MIN (-INT_MAX - 1)
|
|
|
|
#define SHRT_MIN (-SHRT_MAX - 1)
|
2018-08-16 07:43:38 +08:00
|
|
|
#define LONG_MIN (-LONG_MAX - 1L)
|
|
|
|
#define LLONG_MIN (-LLONG_MAX - 1LL)
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
#define SSIZE_MAX INT_MAX
|
|
|
|
|
|
|
|
#define USHRT_MAX 0xFFFF
|
2018-08-16 07:43:38 +08:00
|
|
|
#define UINT_MAX 0xFFFFFFFFU
|
|
|
|
#define ULONG_MAX 0xFFFFFFFFUL
|
|
|
|
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2018-05-19 03:17:07 +08:00
|
|
|
#define PATH_MAX 256
|
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#endif /* __INC_limits_h__ */
|