diff options
author | Victor Westerhuis <victor@westerhu.is> | 2021-12-07 22:41:16 +0100 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-12-11 11:18:08 -0800 |
commit | be2c9cf238ec1d048e3b2d05f1b56a9f2a267668 (patch) | |
tree | 4c87d9d576a2a306b317f7d84a0b18075d0063bf /src/print.c | |
parent | 4e5cb4f242c001e0937bf90f0e7c96fa64e2befe (diff) | |
download | colm-be2c9cf238ec1d048e3b2d05f1b56a9f2a267668.tar.gz |
Use /proc/self/exe to detect colm build directory
The canonical identity of a file on Unix is the combination of device
and inode numbers. This code checks both possible paths for the
colm executable: directly in the build directory (when colm is linked
against libcolm statically) or in libtool's `objdir` subdirectory (when
colm is linked against libcolm dynamically).
This fails in two situations I can see: when /proc is not mounted or
doesn't exist, or when colm is installed using a hard link.
Diffstat (limited to 'src/print.c')
0 files changed, 0 insertions, 0 deletions