From af23a6aac4b66426b64ac1b7008800a726182707 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch <dirk.zimoch@psi.ch> Date: Tue, 6 Mar 2018 17:22:35 +0100 Subject: [PATCH] fix for systems where parts of T_A are macro names (e.g. linux) --- GNUmakefile | 2 +- Makefile | 2 +- require.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index d2388a21..bd9bb5f7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -23,7 +23,7 @@ HEADERS += require.h USR_INCLUDES_Linux=-idirafter ${EPICS_BASE}/include # Pass T_A to the code -USR_CFLAGS += -DT_A=${T_A} +USR_CFLAGS += -DT_A='"${T_A}"' # This should really go into some global WIN32 config file USR_CFLAGS_WIN32 += /D_WIN32_WINNT=0x501 diff --git a/Makefile b/Makefile index 4d5a232e..ea3af0d8 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ LIB_LIBS += $(EPICS_BASE_IOC_LIBS) USR_INCLUDES_Linux=-idirafter ${EPICS_BASE}/include # Pass T_A to the code -USR_CFLAGS += -DT_A=${T_A} +USR_CFLAGS += -DT_A='"${T_A}"' # This should really go into some global WIN32 config file USR_CFLAGS_WIN32 += /D_WIN32_WINNT=0x501 diff --git a/require.c b/require.c index a2db678a..cc67230a 100644 --- a/require.c +++ b/require.c @@ -229,9 +229,9 @@ const char epicsRelease[] = TOSTR(EPICS_VERSION)"."TOSTR(EPICS_REVISION)"."TOSTR const char epicsBasetype[] = TOSTR(EPICS_VERSION)"."TOSTR(EPICS_REVISION); #ifndef T_A -#error T_A not defined: Compile with USR_CFLAGS += -DT_A=${T_A} +#error T_A not defined: Compile with USR_CFLAGS += -DT_A='"${T_A}"' #endif -const char targetArch[] = TOSTR(T_A); +const char targetArch[] = T_A; #ifndef OS_CLASS #error OS_CLASS not defined: Try to compile with USR_CFLAGS += -DOS_CLASS='"${OS_CLASS}"' -- GitLab