Use FC_PATH_MAX to fix build on Windows

This commit is contained in:
Tim-Philipp Müller 2020-02-09 23:24:27 +00:00
parent 7b293e3292
commit a98b620683
1 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ FcConfigFini (void)
static FcChar8 * static FcChar8 *
FcConfigRealPath(const FcChar8 *path) FcConfigRealPath(const FcChar8 *path)
{ {
char resolved_name[PATH_MAX+1]; char resolved_name[FC_PATH_MAX+1];
char *resolved_ret; char *resolved_ret;
if (!path) if (!path)
@ -135,7 +135,7 @@ FcConfigRealPath(const FcChar8 *path)
#ifndef _WIN32 #ifndef _WIN32
resolved_ret = realpath((const char *) path, resolved_name); resolved_ret = realpath((const char *) path, resolved_name);
#else #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"); fprintf (stderr, "Fontconfig warning: GetFullPathNameA failed.\n");
return NULL; return NULL;