diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/utils/utils.w | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w index 8889ce42e63..d7f684c300c 100644 --- a/Build/source/texk/web2c/luatexdir/utils/utils.w +++ b/Build/source/texk/web2c/luatexdir/utils/utils.w @@ -338,10 +338,20 @@ char *stripzeros(char *a) @ @c void initversionstring(char **versions) { - (void) asprintf(versions, + const_string fmt = "Compiled with libpng %s; using libpng %s\n" "Compiled with zlib %s; using zlib %s\n" - "Compiled with poppler version %s\n", + "Compiled with poppler version %s\n"; + size_t len = strlen(fmt) + + strlen(PNG_LIBPNG_VER_STRING) + strlen(png_libpng_ver) + + strlen(ZLIB_VERSION) + strlen(zlib_version) + + strlen(POPPLER_VERSION) + + 1; + + /* len will be more than enough, because of the placeholder chars in fmt + that get replaced by the arguments. */ + *versions = xmalloc(len); + sprintf(*versions, fmt, PNG_LIBPNG_VER_STRING, png_libpng_ver, ZLIB_VERSION, zlib_version, POPPLER_VERSION); } |