aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcstat.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-15 08:55:18 +0200
committermarha <marha@users.sourceforge.net>2012-06-15 08:55:18 +0200
commitd6f64084b9bc07d0bdd527f9354f2d1d962ed16d (patch)
tree81b2652d421992fd63143a04885e332e83e18d07 /fontconfig/src/fcstat.c
parent669b562a737c9418c53bfae69c0dbf1aabe318b4 (diff)
parent7a2af605c2c2b0d2e9bbb0b161eba8842acefbcb (diff)
downloadvcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.tar.gz
vcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.tar.bz2
vcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: fontconfig/src/fcint.h fontconfig/src/fcstat.c mesalib/src/mapi/glapi/gen/GL3x.xml xorg-server/glx/glxext.h
Diffstat (limited to 'fontconfig/src/fcstat.c')
-rw-r--r--fontconfig/src/fcstat.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c
index fd64d5cb3..d8663d036 100644
--- a/fontconfig/src/fcstat.c
+++ b/fontconfig/src/fcstat.c
@@ -82,7 +82,7 @@ FcStat (const FcChar8 *file, struct stat *statb)
char *basename;
DWORD rc;
- if (!GetFileAttributesEx (file, GetFileExInfoStandard, &wfad))
+ if (!GetFileAttributesEx ((LPCSTR) file, GetFileExInfoStandard, &wfad))
return -1;
statb->st_dev = 0;
@@ -91,12 +91,12 @@ FcStat (const FcChar8 *file, struct stat *statb)
* Call GetLongPathName() to get the spelling of the path name as it
* is on disk.
*/
- rc = GetFullPathName (file, sizeof (full_path_name), full_path_name, &basename);
+ rc = GetFullPathName ((LPCSTR) file, sizeof (full_path_name), full_path_name, &basename);
if (rc == 0 || rc > sizeof (full_path_name))
return -1;
rc = GetLongPathName (full_path_name, full_path_name, sizeof (full_path_name));
- statb->st_ino = FcStringHash (full_path_name);
+ statb->st_ino = FcStringHash ((const FcChar8 *) full_path_name);
statb->st_mode = _S_IREAD | _S_IWRITE;
statb->st_mode |= (statb->st_mode >> 3) | (statb->st_mode >> 6);
@@ -129,8 +129,6 @@ FcStat (const FcChar8 *file, struct stat *statb)
return stat ((char *) file, statb);
}
-#endif
-
/* Adler-32 checksum implementation */
struct Adler32 {
int a;
@@ -238,6 +236,7 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
return 0;
}
+#endif /* _WIN32 */
int
FcStatChecksum (const FcChar8 *file, struct stat *statb)
@@ -245,11 +244,16 @@ FcStatChecksum (const FcChar8 *file, struct stat *statb)
if (FcStat (file, statb) == -1)
return -1;
+#ifndef _WIN32
+ /* We have a workaround of the broken stat() in FcStat() for Win32.
+ * No need to do something further more.
+ */
if (FcIsFsMtimeBroken (file))
{
if (FcDirChecksum (file, &statb->st_mtime) == -1)
return -1;
}
+#endif
return 0;
}
@@ -258,7 +262,7 @@ static int
FcFStatFs (int fd, FcStatFS *statb)
{
const char *p = NULL;
- int ret=0;
+ int ret = -1;
FcBool flag = FcFalse;
memset (statb, 0, sizeof (FcStatFS));