[Fontconfig] fontconfig: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 04:15:26 UTC 2020


 configure.ac        |    2 +-
 fc-cache/fc-cache.c |    2 ++
 src/fccache.c       |    2 ++
 src/fccfg.c         |    2 ++
 src/fcdir.c         |    3 +++
 src/fcstat.c        |    2 ++
 src/fcxml.c         |    3 +++
 7 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 03aa12c75e117acb0d160212536f6f832e0dc8d9
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sat Jul 18 17:21:09 2020 +0100

    Guard dirent.h includes
    
    Might not be available on Windows.

diff --git a/configure.ac b/configure.ac
index f0cce3b..2e48952 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,7 +157,7 @@ dnl ==========================================================================
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h sys/statvfs.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
+AC_CHECK_HEADERS([dirent.h fcntl.h stdlib.h string.h unistd.h sys/statvfs.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
 AX_CREATE_STDINT_H([src/fcstdint.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 4138d0b..2e4eeb2 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -41,7 +41,9 @@
 #include <sys/stat.h>
 #include <errno.h>
 #include <fcntl.h>
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 #include <string.h>
 #include <locale.h>
 
diff --git a/src/fccache.c b/src/fccache.c
index c3e6364..d10f249 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -25,7 +25,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 #include <string.h>
 #include <limits.h>
 #include <sys/types.h>
diff --git a/src/fccfg.c b/src/fccfg.c
index f49657a..74e8746 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -25,7 +25,9 @@
 /* Objects MT-safe for readonly access. */
 
 #include "fcint.h"
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 #include <sys/types.h>
 
 #if defined (_WIN32) && !defined (R_OK)
diff --git a/src/fcdir.c b/src/fcdir.c
index 693c845..0f60f87 100644
--- a/src/fcdir.c
+++ b/src/fcdir.c
@@ -23,7 +23,10 @@
  */
 
 #include "fcint.h"
+
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 
 FcBool
 FcFileIsDir (const FcChar8 *file)
diff --git a/src/fcstat.c b/src/fcstat.c
index 5aa1643..5a2bd7c 100644
--- a/src/fcstat.c
+++ b/src/fcstat.c
@@ -22,7 +22,9 @@
  */
 #include "fcint.h"
 #include "fcarch.h"
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 #include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/fcxml.c b/src/fcxml.c
index a366644..c21090a 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -26,7 +26,10 @@
 #include "fcint.h"
 #include <fcntl.h>
 #include <stdarg.h>
+
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#endif
 
 #ifdef ENABLE_LIBXML2
 


More information about the Fontconfig mailing list