pkg_getopt_long: use uint64_t for options bitfield

pull/81/head
William Pitcock 2015-05-21 23:16:37 -05:00
parent 1cc0ae62a9
commit 57924dcee2
3 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@ struct pkg_option {
*/ */
int has_arg; int has_arg;
/* if not NULL, set *flag to val when option found */ /* if not NULL, set *flag to val when option found */
int *flag; uint64_t *flag;
/* if flag not NULL, value to set *flag to; else return value */ /* if flag not NULL, value to set *flag to; else return value */
int val; int val;
}; };

2
main.c
View File

@ -49,7 +49,7 @@
static unsigned int global_traverse_flags = PKGF_NONE; static unsigned int global_traverse_flags = PKGF_NONE;
static int want_flags; static uint64_t want_flags;
static int maximum_traverse_depth = 2000; static int maximum_traverse_depth = 2000;
static char *want_variable = NULL; static char *want_variable = NULL;

View File

@ -26,6 +26,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <stdint.h>
#ifdef _WIN32 #ifdef _WIN32
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN