summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-12-11 07:10:48 -0800
committerDan Nicholson <dbn.lists@gmail.com>2012-12-11 11:59:40 -0800
commit1b47b03c2a159aa1a70a3ea3949a9acb13ab4256 (patch)
treee5b7b1e0dc3512c3826b38639b97a56f61aba174
parent30e7f3131875b71dcd056d82bbade2e8f00d1e70 (diff)
downloadpkg-config-1b47b03c2a159aa1a70a3ea3949a9acb13ab4256.tar.gz
Convert ints used as bools to gbooleans
This matches the GOption documentation that G_OPTION_ARG_NONE should use a gboolean.
-rw-r--r--configure.ac2
-rw-r--r--main.c44
-rw-r--r--parse.c4
-rw-r--r--pkg.h4
4 files changed, 27 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac
index bfb802c..7e887d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ or auto])
esac
AC_MSG_RESULT($use_indirect_deps)
AC_DEFINE_UNQUOTED([ENABLE_INDIRECT_DEPS],
- [`test $use_indirect_deps = no; echo $?`],
+ [`test $use_indirect_deps = yes && echo TRUE || echo FALSE`],
[Link library to all dependent libraries, not only directly needed ones])
AC_SUBST([use_indirect_deps])
diff --git a/main.c b/main.c
index b289614..8f8fbcf 100644
--- a/main.c
+++ b/main.c
@@ -38,33 +38,33 @@
char *pcsysrootdir = NULL;
char *pkg_config_pc_path = NULL;
-static int want_my_version = 0;
-static int want_version = 0;
-static int want_libs = 0;
-static int want_cflags = 0;
-static int want_l_libs = 0;
-static int want_L_libs = 0;
-static int want_other_libs = 0;
-static int want_I_cflags = 0;
-static int want_other_cflags = 0;
-static int want_list = 0;
-static int want_static_lib_list = ENABLE_INDIRECT_DEPS;
-static int want_short_errors = 0;
-static int want_uninstalled = 0;
+static gboolean want_my_version = FALSE;
+static gboolean want_version = FALSE;
+static gboolean want_libs = FALSE;
+static gboolean want_cflags = FALSE;
+static gboolean want_l_libs = FALSE;
+static gboolean want_L_libs = FALSE;
+static gboolean want_other_libs = FALSE;
+static gboolean want_I_cflags = FALSE;
+static gboolean want_other_cflags = FALSE;
+static gboolean want_list = FALSE;
+static gboolean want_static_lib_list = ENABLE_INDIRECT_DEPS;
+static gboolean want_short_errors = FALSE;
+static gboolean want_uninstalled = FALSE;
static char *variable_name = NULL;
-static int want_exists = 0;
-static int want_provides = 0;
-static int want_requires = 0;
-static int want_requires_private = 0;
+static gboolean want_exists = FALSE;
+static gboolean want_provides = FALSE;
+static gboolean want_requires = FALSE;
+static gboolean want_requires_private = FALSE;
static char *required_atleast_version = NULL;
static char *required_exact_version = NULL;
static char *required_max_version = NULL;
static char *required_pkgconfig_version = NULL;
-static int want_silence_errors = 0;
-static int want_variable_list = 0;
-static int want_debug_spew = 0;
-static int want_verbose_errors = 0;
-static int want_stdout_errors = 0;
+static gboolean want_silence_errors = FALSE;
+static gboolean want_variable_list = FALSE;
+static gboolean want_debug_spew = FALSE;
+static gboolean want_verbose_errors = FALSE;
+static gboolean want_stdout_errors = FALSE;
void
debug_spew (const char *format, ...)
diff --git a/parse.c b/parse.c
index ea23502..8c8ce03 100644
--- a/parse.c
+++ b/parse.c
@@ -35,9 +35,9 @@
#include <sys/types.h>
#ifdef G_OS_WIN32
-int dont_define_prefix = FALSE;
+gboolean dont_define_prefix = FALSE;
char *prefix_variable = "prefix";
-int msvc_syntax = FALSE;
+gboolean msvc_syntax = FALSE;
#endif
#ifdef G_OS_WIN32
diff --git a/pkg.h b/pkg.h
index a28c406..e12aab2 100644
--- a/pkg.h
+++ b/pkg.h
@@ -131,12 +131,12 @@ extern char *pkg_config_pc_path;
#ifdef G_OS_WIN32
/* If TRUE, do not automatically define "prefix" while
* parsing each .pc file */
-extern int dont_define_prefix;
+extern gboolean dont_define_prefix;
/* The name of the variable that acts as prefix, unless it is "prefix" */
extern char *prefix_variable;
/* If TRUE, output flags in MSVC syntax. */
-extern int msvc_syntax;
+extern gboolean msvc_syntax;
#endif
#endif