Comment 2 for bug 1553304

Revision history for this message
Andrew Johnson (anj) wrote :

This definitely belongs in libCom, but I'm not sure that we need to add a new API for C code to get the architecture name; something like this works with the existing envDefs.h API, modulo an agreement on names:
    const char *T_A = envGetConfigParamPtr(EPICS_TARGET_ARCH);
I have already written the src/libCom/env changes necessary to set the EPICS_TARGET_ARCH parameter value.

User code can override the compiled-in default value if necessary by setting the EPICS_TARGET_ARCH environment variable. The ENV_PARAM value is not made available as an environment variable by default though. The softIoc main() function or the Registration() routine in the generated *_registerRecordDeviceDriver.cpp file could set a shorter environment variable such as ARCH (suggested for backwards compatibility) using the above call instead of the IOC loading it from the iocBoot/ioc/envPaths file. The name T_A seems too short for a global ENV_PARAM name, hence my longer one.

What other variables do you think we might need?