mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-26 16:09:27 +00:00
cli: chase pkgconf_client_init changes
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
c7d8ebc439
commit
eab5f5da93
@ -33,6 +33,14 @@ static size_t maximum_package_count = 0;
|
||||
static int maximum_traverse_depth = 2000;
|
||||
static FILE *error_msgout = NULL;
|
||||
|
||||
static const char *
|
||||
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
|
||||
{
|
||||
(void) client;
|
||||
|
||||
return getenv(key);
|
||||
}
|
||||
|
||||
static bool
|
||||
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
|
||||
{
|
||||
@ -285,7 +293,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL);
|
||||
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL, environ_lookup_handler);
|
||||
|
||||
/* we have determined what features we want most likely. in some cases, we override later. */
|
||||
pkgconf_client_set_flags(&pkg_client, want_client_flags);
|
||||
|
||||
10
cli/main.c
10
cli/main.c
@ -19,6 +19,14 @@
|
||||
#include "getopt_long.h"
|
||||
#include "core.h"
|
||||
|
||||
static const char *
|
||||
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
|
||||
{
|
||||
(void) client;
|
||||
|
||||
return getenv(key);
|
||||
}
|
||||
|
||||
static bool
|
||||
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
|
||||
{
|
||||
@ -411,7 +419,7 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
/* now, bring up the client. settings are preserved since the client is prealloced */
|
||||
pkgconf_client_init(&state.pkg_client, error_handler, &state, state.personality, &state);
|
||||
pkgconf_client_init(&state.pkg_client, error_handler, &state, state.personality, &state, environ_lookup_handler);
|
||||
|
||||
#ifndef PKGCONF_LITE
|
||||
if (getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL)
|
||||
|
||||
@ -33,6 +33,14 @@ static size_t maximum_package_count = 0;
|
||||
// static int maximum_traverse_depth = 2000;
|
||||
static FILE *error_msgout = NULL;
|
||||
|
||||
static const char *
|
||||
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
|
||||
{
|
||||
(void) client;
|
||||
|
||||
return getenv(key);
|
||||
}
|
||||
|
||||
static bool
|
||||
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
|
||||
{
|
||||
@ -263,7 +271,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL);
|
||||
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL, environ_lookup_handler);
|
||||
|
||||
/* we have determined what features we want most likely. in some cases, we override later. */
|
||||
pkgconf_client_set_flags(&pkg_client, want_client_flags);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user