summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-10-28 21:52:41 +0100
committerBert Münnich <ber.t@posteo.de>2015-10-28 21:52:41 +0100
commit9a7e97cd89b307ecc0cd2f304919b576cb5704d1 (patch)
treef1465f286d2cec6f5bdbdf18ffbf662cdeb181b8 /main.c
parent66c3c55759a7ee23af75657215a2fd0e1aa39558 (diff)
downloadnsxiv-9a7e97cd89b307ecc0cd2f304919b576cb5704d1.tar.zst
Use XSI realpath(3)
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/main.c b/main.c
index a03f5a4..96ea947 100644
--- a/main.c
+++ b/main.c
@@ -131,27 +131,12 @@ void check_add_file(char *filename, bool given)
memset(&files[filecnt/2], 0, filecnt/2 * sizeof(*files));
}
-#if defined _BSD_SOURCE || defined _XOPEN_SOURCE && \
- ((_XOPEN_SOURCE - 0) >= 500 || defined _XOPEN_SOURCE_EXTENDED)
-
if ((files[fileidx].path = realpath(filename, NULL)) == NULL) {
warn("could not get real path of file: %s\n", filename);
return;
}
-#else
- if (*filename != '/') {
- if ((files[fileidx].path = absolute_path(filename)) == NULL) {
- warn("could not get absolute path of file: %s\n", filename);
- return;
- }
- } else {
- files[fileidx].path = NULL;
- }
-#endif
files[fileidx].name = s_strdup(filename);
- if (files[fileidx].path == NULL)
- files[fileidx].path = files[fileidx].name;
if ((bn = strrchr(files[fileidx].name , '/')) != NULL && bn[1] != '\0')
files[fileidx].base = ++bn;
else