diff options
author | Julien Cristau <jcristau@debian.org> | 2008-05-11 00:32:05 +0200 |
---|---|---|
committer | Juliusz Chroboczek <jch@pps.jussieu.fr> | 2008-05-11 00:32:05 +0200 |
commit | e583311c8a73a675fc3396fe24cdafcad53e60e5 (patch) | |
tree | 62f71c9a3ed33bc0b53e89f2864217b52974e6de | |
parent | 8e36cc8647b27a4d14cf3f63045410db79fb98a3 (diff) |
Use autoconf test instead of #ifdef GLIBC for vasprintf.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | fonttosfnt.h | 4 | ||||
-rw-r--r-- | util.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 73f646c..ac6c645 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_PROG_CC AC_PROG_INSTALL AC_CHECK_FUNC(setenv, have_setenv=yes, have_setenv=no) +AC_CHECK_FUNCS([vasprintf]) AM_CONDITIONAL(NEED_SETENV, [test x$have_setenv = xno]) diff --git a/fonttosfnt.h b/fonttosfnt.h index 5b3ec78..d6aa004 100644 --- a/fonttosfnt.h +++ b/fonttosfnt.h @@ -24,6 +24,10 @@ THE SOFTWARE. #ifndef _FONTTOSFNT_H_ #define _FONTTOSFNT_H_ 1 +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdarg.h> #include <ft2build.h> #include FT_FREETYPE_H @@ -79,7 +79,7 @@ sprintf_alloc(char *f, ...) return s; } -#ifdef __GLIBC__ +#if HAVE_VASPRINTF char* vsprintf_alloc(char *f, va_list args) { |