diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-22 11:51:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-22 11:51:58 -0400 |
commit | 6fc2d532274ead9c903c6d94b1a513b8d9b6f677 (patch) | |
tree | 1322e7fe3f1dca69e41127bb2a46d6dca54479d0 /src/common/compat.c | |
parent | 7a93ce8f6382a2fe8687e7e42dc398e08480c901 (diff) | |
download | tor-6fc2d532274ead9c903c6d94b1a513b8d9b6f677.tar.gz tor-6fc2d532274ead9c903c6d94b1a513b8d9b6f677.zip |
Remove util_bug dependency on compat.h
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 467c51d6ee..8e418f4c1d 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -493,32 +493,6 @@ tor_strtok_r_impl(char *str, const char *sep, char **lasts) return start; } -#ifdef _WIN32 -/** Take a filename and return a pointer to its final element. This - * function is called on __FILE__ to fix a MSVC nit where __FILE__ - * contains the full path to the file. This is bad, because it - * confuses users to find the home directory of the person who - * compiled the binary in their warning messages. - */ -const char * -tor_fix_source_file(const char *fname) -{ - const char *cp1, *cp2, *r; - cp1 = strrchr(fname, '/'); - cp2 = strrchr(fname, '\\'); - if (cp1 && cp2) { - r = (cp1<cp2)?(cp2+1):(cp1+1); - } else if (cp1) { - r = cp1+1; - } else if (cp2) { - r = cp2+1; - } else { - r = fname; - } - return r; -} -#endif /* defined(_WIN32) */ - /** * Read a 16-bit value beginning at <b>cp</b>. Equivalent to * *(uint16_t*)(cp), but will not cause segfaults on platforms that forbid |