[Fontconfig] fontconfig: Branch 'master' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 2 04:16:38 UTC 2020
src/fccache.c | 8 +++++++-
src/fccfg.c | 8 ++++++--
src/fcwindows.h | 8 ++++++++
3 files changed, 21 insertions(+), 3 deletions(-)
New commits:
commit 93e65a85412a066afc7f6a1ed284d662d25d687d
Author: Tim-Philipp Müller <tim at centricular.com>
Date: Thu Jun 25 18:38:48 2020 +0100
Fix build on Windows some more
diff --git a/src/fccache.c b/src/fccache.c
index cefe4e9..e42ebbb 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -33,6 +33,8 @@
#ifndef _WIN32
#include <sys/time.h>
+#else
+ #include <winsock2.h> /* for struct timeval */
#endif
#include <assert.h>
diff --git a/src/fccfg.c b/src/fccfg.c
index 3730784..0a49e42 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -32,6 +32,10 @@
#define R_OK 4
#endif
+#if defined(_WIN32) && !defined(S_ISFIFO)
+#define S_ISFIFO(m) 0
+#endif
+
static FcConfig *_fcConfig; /* MT-safe */
static FcMutex *_lock;
commit a98b620683f1f95d43121f44e2fb3c20dd238ccb
Author: Tim-Philipp Müller <tim at centricular.com>
Date: Sun Feb 9 23:24:27 2020 +0000
Use FC_PATH_MAX to fix build on Windows
diff --git a/src/fccfg.c b/src/fccfg.c
index 342c996..3730784 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -126,7 +126,7 @@ FcConfigFini (void)
static FcChar8 *
FcConfigRealPath(const FcChar8 *path)
{
- char resolved_name[PATH_MAX+1];
+ char resolved_name[FC_PATH_MAX+1];
char *resolved_ret;
if (!path)
@@ -135,7 +135,7 @@ FcConfigRealPath(const FcChar8 *path)
#ifndef _WIN32
resolved_ret = realpath((const char *) path, resolved_name);
#else
- if (GetFullPathNameA ((LPCSTR) path, PATH_MAX, resolved_name, NULL) == 0)
+ if (GetFullPathNameA ((LPCSTR) path, FC_PATH_MAX, resolved_name, NULL) == 0)
{
fprintf (stderr, "Fontconfig warning: GetFullPathNameA failed.\n");
return NULL;
commit 7b293e32920602201218f62ebfac8f0a956dfa68
Author: Mathieu Duponchelle <mathieu at centricular.com>
Date: Mon May 14 13:26:26 2018 -0700
Some build fixes to support compilation with MSVC on Windows
diff --git a/src/fccache.c b/src/fccache.c
index 7139b08..cefe4e9 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -30,7 +30,11 @@
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
+
+#ifndef _WIN32
+ #include <sys/time.h>
+#endif
+
#include <assert.h>
#if defined(HAVE_MMAP) || defined(__CYGWIN__)
# include <unistd.h>
diff --git a/src/fcwindows.h b/src/fcwindows.h
index a0eee67..2e8b9ec 100644
--- a/src/fcwindows.h
+++ b/src/fcwindows.h
@@ -44,6 +44,14 @@
# define WIN32_EXTRA_LEAN
# define STRICT
# include <windows.h>
+
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+
#endif
#endif /* _FCWINDOWS_H_ */
More information about the Fontconfig
mailing list