[Fontconfig] fontconfig: Branch 'master' - 3 commits

Jon TURNEY jon.turney at dronecode.org.uk
Mon Jul 1 10:17:26 PDT 2013


On 27/06/2013 05:16, Akira TAGOH wrote:
>  configure.ac |   29 +++++++++++++++++++++++++++++
>  src/fchash.c |   20 ++++++++++----------
>  src/fcname.c |    2 +-
>  src/fcstat.c |   10 ++++++++++
>  4 files changed, 50 insertions(+), 11 deletions(-)
> 
> New commits:
> commit 38ab7ab2fbd83c0c62e4b78302b5fe89da0cb79e
> Author: Akira TAGOH <akira at tagoh.org>
> Date:   Thu Jun 27 13:10:27 2013 +0900
> 
>     Fix a incompatible pointer warning on NetBSD
> 
> diff --git a/configure.ac b/configure.ac
> index 0f129db..a2b1c72 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -161,6 +161,35 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([[
>  		AC_MSG_RESULT([yes])
>  		AC_DEFINE([HAVE_POSIX_FADVISE], [1], [Define to 1 if you have the 'posix_fadvise' function.])
>  	],[AC_MSG_RESULT([no])])
> +AC_MSG_CHECKING([for scandir])
> +AC_LINK_IFELSE([AC_LANG_SOURCE([[
> +	#include <dirent.h>
> +	int comp(const struct dirent **, const struct dirent **);
> +	int comp(const struct dirent **a, const struct dirent **b) { return 0; }
> +	int main(void) {
> +	    struct dirent **d;
> +	    return scandir(".", &d, 0, &comp) >= 0;
> +	}
> +	]])],[
> +		AC_MSG_RESULT([yes])
> +		AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.])
> +	],[
> +		AC_LINK_IFELSE([AC_LANG_SOURCE([[
> +			#include <dirent.h>
> +			int comp(const void *, const void *);
> +			int comp(const void *a, const void *b) { return 0; }
> +			int main(void) {
> +			    struct dirent **d;
> +			    return scandir(".", &d, 0, &comp) >= 0;
> +			}
> +		]])],[
> +			AC_MSG_RESULT([yes])
> +			AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)])
> +		],[
> +			AC_MSG_ERROR([
> +*** No scandir function available.])
> +		])
> +	])
>  CFLAGS="$fc_saved_CFLAGS"

This change makes it a configure error not to have scandir().  This prevents
building for mingw (see [1]) where scandir() is not available, but I don't
think scandir() is needed, because fcstat.c uses an alternate implementation
when WIN32 is defined.

[1] http://tinderbox.x.org/builds/2013-07-01-0014/logs/fontconfig/



More information about the Fontconfig mailing list