Doing #ifdef DEBUG and #define func() right? This doesn't seem quite right, but it's the best I could do. Is there a way to do this better? My goal is to use DEBUG when I'm developing by doing a 'cc -DDEBUG' at the prompt.

#ifndef DEBUG
#define ptrValues ptrvaluesRemote
#else
#define ptrValues ptrValuesLocal
#endif

ptrLinks = (struct sLinkDescriptionLayout*) ptrValues();
Perhaps use NDEBUG (as used in assert.h) instead of making up your own.  Also note that unless you put an ifdef around the two functions you might get a linkage warning (as one of the functions might be unused).  A warning is undesirable, but so is putting the ifdef around the functions, which will result in one of the functions not being compiled and in time the function may rot.

Note that you might achieve the same end using the tool-chain to modify the symbol table.  

Another alternative would be to name the two functions the same in two separate files and link one or the other as required - that would be a cleaner solution, but would need documenting.

Also...

Perhaps make ptrLinks and ptrValuesEtc the same type so that a cast is unnecessary.

Consider whether ptrLinks and ptrValuesEtc are correctly named:


they appear to the uninitiated (me) to mean different things;
also, one is a function and the other a pointer but their form is the same.