forked from nuttx/nuttx-update
Fix some of the SIZE_MAX definitions updated in a recent commit
This commit is contained in:
parent
2060d75ba2
commit
8e1b493786
3 changed files with 24 additions and 18 deletions
|
@ -123,11 +123,22 @@
|
||||||
#define _POSIX_OPEN_MAX CONFIG_NFILE_DESCRIPTORS
|
#define _POSIX_OPEN_MAX CONFIG_NFILE_DESCRIPTORS
|
||||||
#define _POSIX_PATH_MAX CONFIG_PATH_MAX
|
#define _POSIX_PATH_MAX CONFIG_PATH_MAX
|
||||||
#define _POSIX_PIPE_BUF 512
|
#define _POSIX_PIPE_BUF 512
|
||||||
#define _POSIX_SSIZE_MAX INT_MAX
|
|
||||||
#define _POSIX_STREAM_MAX CONFIG_NFILE_STREAMS
|
#define _POSIX_STREAM_MAX CONFIG_NFILE_STREAMS
|
||||||
#define _POSIX_TZNAME_MAX 3
|
#define _POSIX_TZNAME_MAX 3
|
||||||
|
|
||||||
/* Requred for sigqueue */
|
#ifdef CONFIG_SMALL_MEMORY
|
||||||
|
|
||||||
|
#define _POSIX_SSIZE_MAX 32767 /* See sys/types.h */
|
||||||
|
#define _POSIX_SSIZE_MIN -32768
|
||||||
|
|
||||||
|
#else /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
||||||
|
#define _POSIX_SSIZE_MAX 2147483647 /* See sys/types.h */
|
||||||
|
#define _POSIX_SSIZE_MIN -2147483648
|
||||||
|
|
||||||
|
#endif /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
||||||
|
/* Required for sigqueue */
|
||||||
|
|
||||||
#define _POSIX_RTSIG_MAX 31
|
#define _POSIX_RTSIG_MAX 31
|
||||||
#define _POSIX_SIGQUEUE_MAX 32
|
#define _POSIX_SIGQUEUE_MAX 32
|
||||||
|
@ -184,6 +195,7 @@
|
||||||
#define PATH_MAX _POSIX_PATH_MAX
|
#define PATH_MAX _POSIX_PATH_MAX
|
||||||
#define PIPE_BUF _POSIX_PIPE_BUF
|
#define PIPE_BUF _POSIX_PIPE_BUF
|
||||||
#define SSIZE_MAX _POSIX_SSIZE_MAX
|
#define SSIZE_MAX _POSIX_SSIZE_MAX
|
||||||
|
#define SSIZE_MIN _POSIX_SSIZE_MIN
|
||||||
#define STREAM_MAX _POSIX_STREAM_MAX
|
#define STREAM_MAX _POSIX_STREAM_MAX
|
||||||
#define TZNAME_MAX _POSIX_TZNAME_MAX
|
#define TZNAME_MAX _POSIX_TZNAME_MAX
|
||||||
|
|
||||||
|
|
|
@ -185,10 +185,16 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SMALL_MEMORY
|
#ifdef CONFIG_SMALL_MEMORY
|
||||||
# define SIZE_MAX 0xffff
|
|
||||||
#else
|
#define SIZE_MAX UINT16_MAX /* See sys/types.h */
|
||||||
# define SIZE_MAX 0xffffffff
|
#define RSIZE_MAX UINT16_MAX
|
||||||
#endif
|
|
||||||
|
#else /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
||||||
|
#define SIZE_MAX UINT32_MAX /* See sys/types.h */
|
||||||
|
#define RSIZE_MAX UINT32_MAX
|
||||||
|
|
||||||
|
#endif /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
# define WCHAR_MIN
|
# define WCHAR_MIN
|
||||||
|
|
|
@ -133,26 +133,14 @@ typedef unsigned int mode_t;
|
||||||
|
|
||||||
#ifdef CONFIG_SMALL_MEMORY
|
#ifdef CONFIG_SMALL_MEMORY
|
||||||
|
|
||||||
#define SIZE_MAX UINT16_MAX
|
|
||||||
typedef uint16_t size_t;
|
typedef uint16_t size_t;
|
||||||
|
|
||||||
#define SSIZE_MAX INT16_MAX
|
|
||||||
#define SSIZE_MIN INT16_MIN
|
|
||||||
typedef int16_t ssize_t;
|
typedef int16_t ssize_t;
|
||||||
|
|
||||||
#define RSIZE_MAX UINT16_MAX
|
|
||||||
typedef uint16_t rsize_t;
|
typedef uint16_t rsize_t;
|
||||||
|
|
||||||
#else /* CONFIG_SMALL_MEMORY */
|
#else /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
||||||
#define SIZE_MAX UINT32_MAX
|
|
||||||
typedef uint32_t size_t;
|
typedef uint32_t size_t;
|
||||||
|
|
||||||
#define SSIZE_MAX INT32_MAX
|
|
||||||
#define SSIZE_MIN INT32_MIN
|
|
||||||
typedef int32_t ssize_t;
|
typedef int32_t ssize_t;
|
||||||
|
|
||||||
#define RSIZE_MAX UINT32_MAX
|
|
||||||
typedef uint32_t rsize_t;
|
typedef uint32_t rsize_t;
|
||||||
|
|
||||||
#endif /* CONFIG_SMALL_MEMORY */
|
#endif /* CONFIG_SMALL_MEMORY */
|
||||||
|
|
Loading…
Reference in a new issue