diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/resource.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/resource.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h index f825cba929..c649217e7e 100644 --- a/sysdeps/unix/sysv/linux/bits/resource.h +++ b/sysdeps/unix/sysv/linux/bits/resource.h @@ -102,12 +102,20 @@ enum __rlimit_resource RLIM_NLIMITS = RLIMIT_NLIMITS, #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS - - /* Value to indicate that there is no limit. */ - RLIM_INFINITY = (long int)(~0UL >> 1) -#define RLIM_INFINITY RLIM_INFINITY }; +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0x7fffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffLL +#endif + + /* Type for resource quantity measurement. */ #ifndef __USE_FILE_OFFSET64 typedef __rlim_t rlim_t; |