summaryrefslogtreecommitdiffstats
path: root/include/pbl.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-06-15 08:59:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-15 09:01:09 +0200
commit8601b37911c1e2929c4e5bfca52c7237154b442e (patch)
tree61704caa2f7d4015511021716a7458a91995f5b7 /include/pbl.h
parent4b28ee86c605a2f43d574995b6bae0d37fc24561 (diff)
downloadbarebox-8601b37911c1e2929c4e5bfca52c7237154b442e.tar.gz
barebox-8601b37911c1e2929c4e5bfca52c7237154b442e.tar.xz
pbl: Provide C macro to test if we are compiling the pbl
Provide IN_PBL as boolean constant which can be tested for in C. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/pbl.h')
-rw-r--r--include/pbl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/pbl.h b/include/pbl.h
index d041a3fbad..787bd8293f 100644
--- a/include/pbl.h
+++ b/include/pbl.h
@@ -12,4 +12,10 @@ extern unsigned long free_mem_end_ptr;
void pbl_barebox_uncompress(void *dest, void *compressed_start, unsigned int len);
+#ifdef __PBL__
+#define IN_PBL 1
+#else
+#define IN_PBL 0
+#endif
+
#endif /* __PBL_H__ */