On 19/09/04 03:42PM, jim.cromie@xxxxxxxxx wrote: > in the kernel, there are a lot of usages of __FILE__ > > this means that there are a lot of copies of fully rooted paths, > including all the varying ~/src/linux prefixes used by individual builders. On gcc, `__FILE__` is the path of the file relative to the directory that the build is run from. Try something like #include <stdio.h> #define testing() printf("%s\n", __FILE__) int main() { testing(); } and compile it from different directories to replicate this behaviour. > > Id hazard a guess that something like __RELPATH_FILE__ > would work in many cases and perhaps even be more readable > (by reducing long strings) in the generated output > > Do the macros exist to cobble this together for compile-time ? > Does it warrant a short name ? either to wrap __FILE__ uses or replace them ? > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@xxxxxxxxxxxxxxxxx > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies