aboutsummaryrefslogtreecommitdiff
path: root/tests/tcctest.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-07-13 15:37:36 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:08 +0100
commitb7e0b693a65793a5aeee51cf9fa58638376c6f06 (patch)
treedcef22c357f914889f930807c88ccd6574893bfe /tests/tcctest.h
parent8a1a2a60336264a5f96fae4c7f02424c6928b7c3 (diff)
downloadtinycc-b7e0b693a65793a5aeee51cf9fa58638376c6f06.tar.gz
tinycc-b7e0b693a65793a5aeee51cf9fa58638376c6f06.tar.bz2
tccpp: Implement __BASE_FILE__ macro
Like __FILE__ but always refers to the command line file name also from inside headers.
Diffstat (limited to 'tests/tcctest.h')
-rw-r--r--tests/tcctest.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tcctest.h b/tests/tcctest.h
new file mode 100644
index 0000000..b301c7c
--- /dev/null
+++ b/tests/tcctest.h
@@ -0,0 +1,9 @@
+static inline const char *get_basefile_from_header(void)
+{
+ return __BASE_FILE__;
+}
+
+static inline const char *get_file_from_header(void)
+{
+ return __FILE__;
+}