Matt, this has been brought to my attention before, but I was
uncertain what to do. I don't want to change types to long long as
this introduced new problems on other systems.
Any other suggestions?
M
Matt Richards wrote:
> Greetings. I am still getting range overflow on AIX. The mtime value
> is too large to be a long.
>
> Validation: Int range item on rhs of lval 'mtime' given as
> {1210603176,1242052776 => 1210603176} is out of bounds (should be in
> [0,2147483648])
> Validation: Int range item on rhs of lval 'mtime' given as
> {1210603175,1242052775 => 1210603175} is out of bounds (should be in
> [0,2147483648])
>
> files:
>
> "$(sys.workdir)/cluster/backup"
> delete => tidy,
> file_select => days_old("1"),
> depth_search => recurse("inf");
>
>
> I changed some long's to long long in syntax.c which appears to work for AIX:
>
> # diff syntax.c syntax.c.DIST
> 654c654
> < long long max = CF_LOWINIT, min = CF_HIGHINIT, val;
> ---
>> long max = CF_LOWINIT, min = CF_HIGHINIT, val;
> 668c668
> < sscanf(split->name,"%lld",&min);
> ---
>> sscanf(split->name,"%ld",&min);
> 676c676
> < sscanf(split->next->name,"%lld",&max);
> ---
>> sscanf(split->next->name,"%ld",&max);
> 697c697
> < snprintf(output,CF_BUFSIZE,"Int item on rhs of lval \'%s\' given
> as {%s => %lld} is out of bounds (should be in
> [%s])",lval,s,val,range);
> ---
>> snprintf(output,CF_BUFSIZE,"Int item on rhs of lval \'%s\' given as {%s
>> => %ld} is out of bounds (should be in [%s])",lval,s,val,range);
> 711c711
> < long long max = CF_LOWINIT, min = CF_HIGHINIT, val;
> ---
>> long max = CF_LOWINIT, min = CF_HIGHINIT, val;
> 731c731
> < sscanf(split->name,"%lld",&min);
> ---
>> sscanf(split->name,"%ld",&min);
> 739c739
> < sscanf(split->next->name,"%lld",&max);
> ---
>> sscanf(split->next->name,"%ld",&max);
> 772c772
> < snprintf(output,CF_BUFSIZE,"Int range item on rhs of lval
> \'%s\' given as {%s => %lld} is out of bounds (should be in
> [%s])",lval,s,val,range);
> ---
>> snprintf(output,CF_BUFSIZE,"Int range item on rhs of lval \'%s\' given
>> as {%s => %ld} is out of bounds (should be in [%s])",lval,s,val,range);
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine
--
Mark Burgess
-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway
Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine