diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-08 08:25:46 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-08 08:25:46 -0600 |
commit | 5f5b6293926e29c6c2101f8921c808333260b9b9 (patch) | |
tree | 9aac843bd462cceff3c7c22ffff80a67ac959a1a /nuttx/include/limits.h | |
parent | b4349d2076c490098375c65996d58139870512b8 (diff) | |
download | nuttx-5f5b6293926e29c6c2101f8921c808333260b9b9.tar.gz nuttx-5f5b6293926e29c6c2101f8921c808333260b9b9.tar.bz2 nuttx-5f5b6293926e29c6c2101f8921c808333260b9b9.zip |
Fix some of the SIZE_MAX definitions updated in a recent commit
Diffstat (limited to 'nuttx/include/limits.h')
-rw-r--r-- | nuttx/include/limits.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nuttx/include/limits.h b/nuttx/include/limits.h index 056e2ada8..4d959d153 100644 --- a/nuttx/include/limits.h +++ b/nuttx/include/limits.h @@ -123,11 +123,22 @@ #define _POSIX_OPEN_MAX CONFIG_NFILE_DESCRIPTORS #define _POSIX_PATH_MAX CONFIG_PATH_MAX #define _POSIX_PIPE_BUF 512 -#define _POSIX_SSIZE_MAX INT_MAX #define _POSIX_STREAM_MAX CONFIG_NFILE_STREAMS #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_SIGQUEUE_MAX 32 @@ -184,6 +195,7 @@ #define PATH_MAX _POSIX_PATH_MAX #define PIPE_BUF _POSIX_PIPE_BUF #define SSIZE_MAX _POSIX_SSIZE_MAX +#define SSIZE_MIN _POSIX_SSIZE_MIN #define STREAM_MAX _POSIX_STREAM_MAX #define TZNAME_MAX _POSIX_TZNAME_MAX |