From cdaae97f1f9adb1131740839ef6dd9878104a159 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 31 Oct 2015 12:56:42 +0100 Subject: [PATCH] get_default_paper_size: Use access instead of fn_exists The latter has portability problems. Also access checks that the file is readable not only that it exists. --- src/output/measure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/measure.c b/src/output/measure.c index 3589585501..c352de66d2 100644 --- a/src/output/measure.c +++ b/src/output/measure.c @@ -18,6 +18,7 @@ #include "output/measure.h" +#include #include #include #include @@ -27,7 +28,6 @@ #include #include -#include "data/file-name.h" #include "libpspp/str.h" #include "gl/c-strcase.h" @@ -308,7 +308,7 @@ get_default_paper_size (int *h, int *v) #endif /* libpaper defaults to /etc/papersize. */ - if (fn_exists ("/etc/papersize")) + if (0 == access ("/etc/papersize", R_OK)) return read_paper_conf ("/etc/papersize", h, v); /* Can't find a default. */ -- 2.30.2