tccpp: Implement __BASE_FILE__ macro
Like __FILE__ but always refers to the command line file name also from inside headers.
This commit is contained in:
9
tests/tcctest.h
Normal file
9
tests/tcctest.h
Normal file
@ -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__;
|
||||
}
|
||||
Reference in New Issue
Block a user