diff options
author | marha <marha@users.sourceforge.net> | 2014-02-07 23:46:30 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-02-07 23:46:30 +0100 |
commit | 6daf40f6b1138efad98dbb579cd35520cbc349bb (patch) | |
tree | 7f45dbb347f5e1a73b18a720633b9d801c968490 /fontconfig/src | |
parent | 5c64f94cf4cf8457a5616fe20b9a27174895f1a8 (diff) | |
parent | 982ac918afe6a1c02d5cf735d7b6c56443a048cc (diff) | |
download | vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.gz vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.bz2 vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014
Conflicts:
mesalib/src/glsl/glcpp/glcpp.c
openssl/Makefile
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/fccompat.c | 35 | ||||
-rw-r--r-- | fontconfig/src/fcfreetype.c | 4 | ||||
-rw-r--r-- | fontconfig/src/fcstat.c | 3 |
3 files changed, 29 insertions, 13 deletions
diff --git a/fontconfig/src/fccompat.c b/fontconfig/src/fccompat.c index b685fade3..19b1ecdc0 100644 --- a/fontconfig/src/fccompat.c +++ b/fontconfig/src/fccompat.c @@ -170,14 +170,27 @@ FcRandom(void) static struct random_data fcrandbuf; static char statebuf[256]; static FcBool initialized = FcFalse; +#ifdef _AIX + static char *retval; + long res; +#endif if (initialized != FcTrue) { - initstate_r(time(NULL), statebuf, 256, &fcrandbuf); +#ifdef _AIX + initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf); +#else + initstate_r (time (NULL), statebuf, 256, &fcrandbuf); +#endif initialized = FcTrue; } - random_r(&fcrandbuf, &result); +#ifdef _AIX + random_r (&res, &fcrandbuf); + result = (int32_t)res; +#else + random_r (&fcrandbuf, &result); +#endif #elif HAVE_RANDOM static char statebuf[256]; char *state; @@ -185,30 +198,30 @@ FcRandom(void) if (initialized != FcTrue) { - state = initstate(time(NULL), statebuf, 256); + state = initstate (time (NULL), statebuf, 256); initialized = FcTrue; } else - state = setstate(statebuf); + state = setstate (statebuf); - result = random(); + result = random (); - setstate(state); + setstate (state); #elif HAVE_LRAND48 - result = lrand48(); + result = lrand48 (); #elif HAVE_RAND_R - static unsigned int seed = time(NULL); + static unsigned int seed = time (NULL); - result = rand_r(&seed); + result = rand_r (&seed); #elif HAVE_RAND static FcBool initialized = FcFalse; if (initialized != FcTrue) { - srand(time(NULL)); + srand (time (NULL)); initialized = FcTrue; } - result = rand(); + result = rand (); #else # error no random number generator function available. #endif diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c index 056e0f6b5..97d049206 100644 --- a/fontconfig/src/fcfreetype.c +++ b/fontconfig/src/fcfreetype.c @@ -1586,7 +1586,7 @@ FcFreeTypeQueryFace (const FT_Face face, } if (width == -1 && FT_Get_BDF_Property (face, "SETWIDTH_NAME", &prop) == 0 && - prop.type == BDF_PROPERTY_TYPE_ATOM) + prop.type == BDF_PROPERTY_TYPE_ATOM && prop.u.atom != NULL) { width = FcIsWidth ((FcChar8 *) prop.u.atom); if (FcDebug () & FC_DBG_SCANV) @@ -1716,7 +1716,7 @@ bail3: /* For PCF fonts, override the computed spacing with the one from the property */ if(FT_Get_BDF_Property(face, "SPACING", &prop) == 0 && - prop.type == BDF_PROPERTY_TYPE_ATOM) { + prop.type == BDF_PROPERTY_TYPE_ATOM && prop.u.atom != NULL) { if(!strcmp(prop.u.atom, "c") || !strcmp(prop.u.atom, "C")) spacing = FC_CHARCELL; else if(!strcmp(prop.u.atom, "m") || !strcmp(prop.u.atom, "M")) diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c index 1f37cacf8..01371d637 100644 --- a/fontconfig/src/fcstat.c +++ b/fontconfig/src/fcstat.c @@ -30,6 +30,9 @@ #ifdef HAVE_SYS_VFS_H #include <sys/vfs.h> #endif +#ifdef HAVE_SYS_STATVFS_H +#include <sys/statvfs.h> +#endif #ifdef HAVE_SYS_STATFS_H #include <sys/statfs.h> #endif |