aboutsummaryrefslogtreecommitdiff
path: root/libpkgconf/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpkgconf/client.c')
-rw-r--r--libpkgconf/client.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/libpkgconf/client.c b/libpkgconf/client.c
index 6529dbd..f5f4717 100644
--- a/libpkgconf/client.c
+++ b/libpkgconf/client.c
@@ -13,8 +13,10 @@
* from the use of this software.
*/
+#include <libpkgconf/stdinc.h>
#include <libpkgconf/libpkgconf.h>
#include <libpkgconf/config.h>
+
/*
* !doc
*
@@ -137,15 +139,12 @@ pkgconf_client_deinit(pkgconf_client_t *client)
if (client->buildroot_dir != NULL)
free(client->buildroot_dir);
+ pkgconf_path_free(&client->filter_libdirs);
+ pkgconf_path_free(&client->filter_includedirs);
+
pkgconf_tuple_free_global(client);
pkgconf_path_free(&client->dir_list);
pkgconf_cache_free(client);
-
- /*
- * Fix the leak (issue #130 is reported).
- */
- pkgconf_path_free(&client->filter_libdirs);
- pkgconf_path_free(&client->filter_includedirs);
}
/*
@@ -325,17 +324,7 @@ pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t linen
size_t len;
va_list va;
- /*
- * Workaround MinGW bug which doesn't recognize 'z' length modifier (despite
- * the presence of -std=C99 option) which leads to crash (issue #125 is
- * reported).
- *
- * This indeed is an issue with an outdated Windows run-time (msvcrt.dll)
- * where MinGW delegates the function call. The modifier isn't mentioned in
- * the documentation for Visual Studio 2015, but is for the later one.
- */
- len = snprintf(errbuf, sizeof errbuf, "%s:%lu [%s]: ",
- filename, (unsigned long)lineno, funcname);
+ len = snprintf(errbuf, sizeof errbuf, "%s:" SIZE_FMT_SPECIFIER " [%s]: ", filename, lineno, funcname);
va_start(va, format);
vsnprintf(errbuf + len, sizeof(errbuf) - len, format, va);