texlive[45570] Build/source/texk/web2c/lib/openclose.c: openclose.c:
commits+kakuto at tug.org
commits+kakuto at tug.org
Sun Oct 22 01:24:48 CEST 2017
Revision: 45570
http://tug.org/svn/texlive?view=revision&revision=45570
Author: kakuto
Date: 2017-10-22 01:24:48 +0200 (Sun, 22 Oct 2017)
Log Message:
-----------
openclose.c: use dir_p() instead of defining a new function
Modified Paths:
--------------
trunk/Build/source/texk/web2c/lib/openclose.c
Modified: trunk/Build/source/texk/web2c/lib/openclose.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/openclose.c 2017-10-21 22:19:37 UTC (rev 45569)
+++ trunk/Build/source/texk/web2c/lib/openclose.c 2017-10-21 23:24:48 UTC (rev 45570)
@@ -12,10 +12,6 @@
#include <ptexenc/ptexenc.h>
#endif
-#if !defined(_WIN32)
-#include <sys/stat.h>
-#endif
-
#ifdef WIN32
#undef fopen
#undef xfopen
@@ -150,14 +146,6 @@
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 @@
/*
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;
}
More information about the tex-live-commits
mailing list