This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Update RLIM_INFINITY for x86_64?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 20 Mar 2013 19:04:34 +0100
- Subject: Re: Update RLIM_INFINITY for x86_64?
- References: <5149F6F3 dot 5030605 at cornell dot edu>
- Reply-to: cygwin-developers at cygwin dot com
On Mar 20 13:50, Ken Brown wrote:
> My understanding is that RLIM_INFINITY is usually equal to (or very
> close to) SIZE_MAX on Posix-like systems. If this is right, then I
> think we need something like the attached patch.
>
> Ken
> --- resource.h.orig 2013-03-20 12:20:21.569382900 -0400
> +++ resource.h 2013-03-20 11:54:53.900144800 -0400
> @@ -34,7 +34,11 @@
> #define RLIMIT_NLIMITS 7 /* upper bound of RLIMIT_* defines */
> #define RLIM_NLIMITS RLIMIT_NLIMITS
>
> +#ifdef __x86_64__
> +#define RLIM_INFINITY (0xffffffffffffffffUL)
> +#else
> #define RLIM_INFINITY (0xffffffffUL)
> +#endif
> #define RLIM_SAVED_MAX RLIM_INFINITY
> #define RLIM_SAVED_CUR RLIM_INFINITY
Good catch, thank you!
I simplified this to a single definition
#define RLIM_INFINITY (~0UL)
and checked it in under your name.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat