AnsweredAssumed Answered

64-bit Math MCF5441x and CW 10.3 -- _EWL_LONGLONG

Question asked by Steve Janisch on Jun 5, 2013
Latest reply on Jul 24, 2013 by Carlos_Musich

The MCF54418 I am working on appears to have 64-bit math support in CW 10.3.


I've tested a lot of 64-bit math and it all appears to work fine.


But I am having trouble with using some of the canned 64-bit library functions, e.g. lldiv and llabs


This isn't a major issue, since these functions can be coerced in other ways, but it would just be cleaner if I could use them and I'm not sure exactly how to enable them.


For example, I can define these structures

  div_t     dt ;

  ldiv_t    ldt ;

  lldiv_t   lldt ;


but the lldiv_t will not compile.


When I followed the structure definitions to div_t.h it appeared that _EWL_LONGLONG was not defined.


But even when I added

#define _EWL_LONGLONG 1

to my program it wouldn't build.


I also added it to MCF54418.h and MCF54418_sysinit.h with no better luck...


The only place it IS defined is in ansi_params.h, with this block...


  #if defined(__CWCC__)

   #if __option(longlong)

     #define _EWL_LONGLONG    1


     #define _EWL_LONGLONG    0



   #define _EWL_LONGLONG      0




I didn't want to change this file since it appears to be somewhat a standard code block, rather than a board-specific one.


So would anyone know where exactly would be the place to define _EWL_LONGLONG?