mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
11fcc2f1ac
The goal of this commit is to reduce differences between the autotools and meson build. With autotools AC_FUNC_ALLOCA was used which defines HAVE_ALLOCA_H, HAVE_ALLOCA, C_ALLOCA. meson tried to replicate that with has_function() but alloca can be a macro and and is named _alloca under Windows. Since we require a working alloca anyway and only need to know if the header exists replace AC_FUNC_ALLOCA with a simple AC_CHECK_HEADERS. There is still one user of HAVE_ALLOCA in the embedded gnulib, but since alloca is always provided through galloca.h just force define HAVE_ALLOCA there and add a comment. The docs were mentioning alloca as an example for cross compiling. Since that variable no longer exists now replace it with another one. |
||
---|---|---|
.. | ||
asnprintf.c | ||
g-gnulib.h | ||
Makefile.am | ||
meson.build | ||
printf-args.c | ||
printf-args.h | ||
printf-parse.c | ||
printf-parse.h | ||
printf.c | ||
printf.h | ||
README | ||
vasnprintf.c | ||
vasnprintf.h | ||
verify.h | ||
xsize.h |
The files asnprintf.c printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h are taken from the vasnprintf module of the GNUlib package, which can be found at: http://www.gnu.org/software/gnulib/ All files have been modified to include g-gnulib.h. vasnprintf.c has also been modified to include support for long long printing if the system printf doesn't. This code is protected by #ifndef HAVE_LONG_LONG_FORMAT. Code has been added to printf-args.[ch], printf-parse.c and vasnprintf.c to support printing of __int64 values with the I64 format modifier. This is protected by #ifdef HAVE_INT64_AND_I64. The files printf.h printf.c g-gnulib.h have been written by me. printf.[hc] contain implementations of the remaining functions in the printf family based on vasnprintf. g-gnulib.h is included by all source files in order to move all exported functions to the _g_gnulib namespace, replace malloc by g_malloc and make sure that snprintf is only used if it implements C99 return value semantics. Matthias Clasen November 1, 2003