Re: [patch] sim/erc32/ max simulation time extended by using 64bit ints

Joel Sherrill
2010-05-21T15:15:00Z

On 05/21/2010 10:05 AM, Joel Brobecker wrote:
>>>> * sis.h: Remove #include<stdint.h>.
>>>> (uint64, int64): Redefine without using stdint.h.
>>>> (UINT64_MAX): Define.
>>>>
>>> FYI: I just checked that one in.
>>>
>>>
>> Doug do you still want that VAL -> strtol/ll change?
>>
> Can you provide more info, which change is that?
>
Doug seemed to want to get rid of the "VAL" macros
in the sim/erc32 source code. I handled one file in
this patch because it was only used once in the file
and it seemed silly to even have the macro. The other
two files had more uses so I wanted to wait until
the maximum time to 64 bits was committed.

Here is his comment

1)

-#define VAL(x) strtol(x,(char **)NULL,0)
+#define VAL(x) strtoull(x,(char **)NULL,0)

I realize VAL is only used once in interf.c but it's also defined in
other files as well.
While one could consolidate them, having the macro at all is probably
less preferable to just calling strtoul{,l} directly.
I would just remove it from interf.c and call strtoull directly.

I have fixed this in interf.c. But didn't touch the other files.
Is this OK?

--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985