diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:17:36 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:17:36 +0000 |
commit | 904b939cbd81a542303da2c58288b95b153106f5 (patch) | |
tree | 84b3751ed1deacc51eb186023101360ae92ef221 /Src/Builtins/rlimits.c | |
parent | b4a5b9db8b528f9c9b6a9cbb00db381c95659380 (diff) | |
download | zsh-904b939cbd81a542303da2c58288b95b153106f5.tar.gz zsh-904b939cbd81a542303da2c58288b95b153106f5.tar.xz zsh-904b939cbd81a542303da2c58288b95b153106f5.zip |
zsh-3.1.5-pws-10 zsh-3.1.5-pws-10
Diffstat (limited to 'Src/Builtins/rlimits.c')
-rw-r--r-- | Src/Builtins/rlimits.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index 2af8dc6ac..7825a900d 100644 --- a/Src/Builtins/rlimits.c +++ b/Src/Builtins/rlimits.c @@ -37,7 +37,7 @@ # include "rlimits.h" -# if defined(RLIM_T_IS_QUAD_T) || defined(RLIM_T_IS_UNSIGNED) +# if defined(RLIM_T_IS_QUAD_T) || defined(RLIM_T_IS_LONG_LONG) || defined(RLIM_T_IS_UNSIGNED) static rlim_t zstrtorlimt(const char *s, char **t, int base) { @@ -62,9 +62,9 @@ zstrtorlimt(const char *s, char **t, int base) *t = (char *)s; return ret; } -# else /* !RLIM_T_IS_QUAD_T && !RLIM_T_IS_UNSIGNED */ +# else /* !RLIM_T_IS_QUAD_T && !RLIM_T_IS_LONG_LONG && !RLIM_T_IS_UNSIGNED */ # define zstrtorlimt(a, b, c) zstrtol((a), (b), (c)) -# endif /* !RLIM_T_IS_QUAD_T && !RLIM_T_IS_UNSIGNED */ +# endif /* !RLIM_T_IS_QUAD_T && !RLIM_T_IS_LONG_LONG && !RLIM_T_IS_UNSIGNED */ /* Display resource limits. hard indicates whether `hard' or `soft' * * limits should be displayed. lim specifies the limit, or may be -1 * @@ -107,9 +107,15 @@ showlimits(int hard, int lim) else printf("%qdkB\n", val / 1024L); # else +# ifdef RLIM_T_IS_LONG_LONG + printf("%lldMB\n", val / (1024L * 1024L)); + else + printf("%lldkB\n", val / 1024L); +# else printf("%ldMB\n", val / (1024L * 1024L)); else printf("%ldkB\n", val / 1024L); +# endif /* RLIM_T_IS_LONG_LONG */ # endif /* RLIM_T_IS_QUAD_T */ } } |