From 7142e79ff38d960e45d6bcae03ec698967226dbb Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 21 Oct 2017 23:24:48 +0000 Subject: openclose.c: use dir_p() instead of defining a new function git-svn-id: svn://tug.org/texlive/trunk@45570 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/lib/openclose.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'Build/source/texk/web2c/lib') diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index 4ecf3827c93..57c4db9aae7 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -12,10 +12,6 @@ #include #endif -#if !defined(_WIN32) -#include -#endif - #ifdef WIN32 #undef fopen #undef xfopen @@ -150,14 +146,6 @@ recorder_record_output (const_string name) whether or not the open succeeded. If it did, `nameoffile' is set to the full filename opened, and `namelength' to its length. */ -#if !defined(_WIN32) -static int is_dirp (char *buff) -{ - struct stat stats; - return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode); -} -#endif - boolean open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) { @@ -189,7 +177,7 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) /* if fname is a directory, discard it. */ - if (*f_ptr && is_dirp (fname)) { + if (*f_ptr && dir_p (fname)) { fclose (*f_ptr); *f_ptr = NULL; } -- cgit v1.2.3