diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 20:42:02 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 21:40:05 +1000 |
commit | 13bd3c97d9cc4661fe58a0ca8a73f8e9f891a8f1 (patch) | |
tree | 6834354a98b849cf943698a65d875af6ba92f91a | |
parent | [BUILTIN] Disable histcmd completely when SMALL is defined (diff) | |
download | dash-13bd3c97d9cc4661fe58a0ca8a73f8e9f891a8f1.tar.gz dash-13bd3c97d9cc4661fe58a0ca8a73f8e9f891a8f1.zip |
[SYSTEM] Added default definition for SSIZE_MAX
klibc doesn't define the macro SSIZE_MAX.
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/system.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 09e03e3..b9842de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ * Added default implementation of killpg. * Disable ulimit if there is no getrlimit. * Disable histcmd completely when SMALL is defined. + * Added default definition for SSIZE_MAX. 2005-10-26 Herbert Xu <herbert@gondor.apana.org.au> diff --git a/src/system.h b/src/system.h index 1242e24..833e162 100644 --- a/src/system.h +++ b/src/system.h @@ -26,9 +26,14 @@ * SUCH DAMAGE. */ +#include <limits.h> #include <signal.h> #include <sys/types.h> +#ifndef SSIZE_MAX +#define SSIZE_MAX ((ssize_t)((size_t)-1 >> 1)) +#endif + static inline void sigclearmask(void) { #ifdef HAVE_SIGSETMASK |