Subject: Re: getrlimit() bogus results
To: Riccardo Mottola <rollei@tiscalinet.it>
From: Klaus Klein <kleink@mibh.de>
List: port-macppc
Date: 04/25/2004 23:02:55
On Tuesday 25 May 2004 22:34, you wrote:

>         printf("cur=%d  max=%d\n", rlim.rlim_cur, rlim.rlim_max);
>         printf("infinity=%d\n", RLIM_INFINITY);

The results of getrlimit() are probably fine, but these printf
conversions are not appropriate for rlim_t.  Casting these to
intmax_t and formatting as %jd (alternatively long long int and
%lld) will do the trick.


- Klaus