Which C language features cause porting problems?
Our suggestions for Charm++ developers are: • Avoid the nonstandard type “long long”, even though many compilers happen to support it. Use CMK_INT8 or CMK_UINT8, from conv-config.h, which are macros for the right thing. “long long” is not supported on many 64-bit machines (where “long” is 64 bits) or on Windows machines (where it’s “__int64”). • The “long double” type isn’t present on all compilers. You can protect long double code with #ifdef CMK_LONG_DOUBLE_DEFINED if it’s really needed. • Never use C++ “//” comments in C code, or headers included by C. This will not compile under many compilers, including the IBM SP C compiler. • “bzero” and “bcopy” are BSD-specific calls. Use memset and memcpy for portable programs.