From 0c6df2d55cd934c20f9add4f3fda7d59a1fc4051 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 8 Mar 2017 12:37:57 +0100 Subject: [PATCH] include/zephyr.h: Define __ZEPHYR__ if not already. __ZEPHYR__ preprocessor macro is a way for a (cross-platform) application to test if it's built for Zephyr. Currently it's defined by Makefile, so if an app uses it's own build system, it won't be available. So, define it in the standard header too to cover such a case. Change-Id: Id708d1f20fe3b415968ad8475da449f54ad3c3fb Signed-off-by: Paul Sokolovsky --- include/zephyr.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/zephyr.h b/include/zephyr.h index 0fee5c1f784..8bc08bf34aa 100644 --- a/include/zephyr.h +++ b/include/zephyr.h @@ -7,6 +7,14 @@ #ifndef _ZEPHYR__H #define _ZEPHYR__H +/* + * Applications can identify whether they are built for Zephyr by + * macro below. (It may be already defined by a makefile or toolchain.) + */ +#ifndef __ZEPHYR__ +#define __ZEPHYR__ +#endif + #include #ifdef CONFIG_MDEF