* Update RLIM_INFINITY for x86_64?
@ 2013-03-20 17:51 Ken Brown
2013-03-20 18:04 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2013-03-20 17:51 UTC (permalink / raw)
To: cygwin-developers
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
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
[-- Attachment #2: rlim_infinity.patch --]
[-- Type: text/plain, Size: 430 bytes --]
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Update RLIM_INFINITY for x86_64?
2013-03-20 17:51 Update RLIM_INFINITY for x86_64? Ken Brown
@ 2013-03-20 18:04 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2013-03-20 18:04 UTC (permalink / raw)
To: cygwin-developers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-20 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 17:51 Update RLIM_INFINITY for x86_64? Ken Brown
2013-03-20 18:04 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).