From 2681622ccf832a07326d89f448c750897e236e1e Mon Sep 17 00:00:00 2001 From: Matthias Schulz Date: Fri, 29 Sep 2017 05:24:18 -0700 Subject: [PATCH] bcm43451b1: updated structs. libargp: made it compile using theos. --- firmwares/bcm43451b1/structs.common.h | 4 ++-- utilities/libargp/argp-help.c | 2 +- utilities/libargp/argp-parse.c | 28 +++++++++++++-------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/firmwares/bcm43451b1/structs.common.h b/firmwares/bcm43451b1/structs.common.h index 8fa729146..75fca5663 100644 --- a/firmwares/bcm43451b1/structs.common.h +++ b/firmwares/bcm43451b1/structs.common.h @@ -720,11 +720,11 @@ struct wlc_info { int PAD; /* 0X5B4 */ int PAD; /* 0X5B8 */ int PAD; /* 0X5BC */ - void *active_queue; /* 0X5C0 verified */ + void *active_queue; /* 0X5C0 */ int PAD; /* 0X5C4 */ int PAD; /* 0X5C8 */ int PAD; /* 0X5CC */ - int PAD; /* 0X5D0 */ + void *hwtimer_stuff; /* 0X5D0 verified for BCM43451b1 */ int PAD; /* 0X5D4 */ int PAD; /* 0X5D8 */ int PAD; /* 0X5DC */ diff --git a/utilities/libargp/argp-help.c b/utilities/libargp/argp-help.c index cabde15bd..12f5d6fac 100644 --- a/utilities/libargp/argp-help.c +++ b/utilities/libargp/argp-help.c @@ -1914,7 +1914,7 @@ __argp_failure (const struct argp_state *state, int status, int errnum, if (errnum) { - char buf[200]; + //char buf[200]; #ifdef USE_IN_LIBIO if (_IO_fwide (stream, 0) > 0) diff --git a/utilities/libargp/argp-parse.c b/utilities/libargp/argp-parse.c index a6fc0080a..9494aadb8 100644 --- a/utilities/libargp/argp-parse.c +++ b/utilities/libargp/argp-parse.c @@ -191,7 +191,7 @@ find_long_option (struct option *long_options, const char *name) /* The state of a "group" during parsing. Each group corresponds to a particular argp structure from the tree of such descending from the top level argp passed to argp_parse. */ -struct group +struct group_local { /* This group's parsing function. */ argp_parser_t parser; @@ -208,7 +208,7 @@ struct group unsigned args_processed; /* This group's parser's parent's group. */ - struct group *parent; + struct group_local *parent; unsigned parent_index; /* And the our position in the parent. */ /* These fields are swapped into and out of the state structure when @@ -221,7 +221,7 @@ struct group from STATE before calling, and back into state afterwards. If GROUP has no parser, EBADKEY is returned. */ static error_t -group_parse (struct group *group, struct argp_state *state, int key, char *arg) +group_parse (struct group_local *group, struct argp_state *state, int key, char *arg) { if (group->parser) { @@ -252,9 +252,9 @@ struct parser struct _getopt_data opt_data; /* States of the various parsing groups. */ - struct group *groups; + struct group_local *groups; /* The end of the GROUPS array. */ - struct group *egroup; + struct group_local *egroup; /* A vector containing storage for the CHILD_INPUTS field in all groups. */ void **child_inputs; @@ -285,10 +285,10 @@ struct parser_convert_state into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and CVT->LONG_END are the points at which new options are added. Returns the next unused group entry. CVT holds state used during the conversion. */ -static struct group * +static struct group_local * convert_options (const struct argp *argp, - struct group *parent, unsigned parent_index, - struct group *group, struct parser_convert_state *cvt) + struct group_local *parent, unsigned parent_index, + struct group_local *group, struct parser_convert_state *cvt) { /* REAL is the most recent non-alias value of OPT. */ const struct argp_option *real = argp->options; @@ -459,7 +459,7 @@ parser_init (struct parser *parser, const struct argp *argp, int argc, char **argv, int flags, void *input) { error_t err = 0; - struct group *group; + struct group_local *group; struct parser_sizes szs; struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER; char *storage; @@ -477,7 +477,7 @@ parser_init (struct parser *parser, const struct argp *argp, calc_sizes (argp, &szs); /* Lengths of the various bits of storage used by PARSER. */ - glen = (szs.num_groups + 1) * sizeof (struct group); + glen = (szs.num_groups + 1) * sizeof (struct group_local); clen = szs.num_child_inputs * sizeof (void *); llen = (szs.long_len + 1) * sizeof (struct option); slen = szs.short_len + 1; @@ -570,7 +570,7 @@ static error_t parser_finalize (struct parser *parser, error_t err, int arg_ebadkey, int *end_index) { - struct group *group; + struct group_local *group; if (err == EBADKEY && arg_ebadkey) /* Suppress errors generated by unparsed arguments. */ @@ -669,7 +669,7 @@ parser_parse_arg (struct parser *parser, char *val) we're parsing is again the front of the arg vector. */ int index = --parser->state.next; error_t err = EBADKEY; - struct group *group; + struct group_local *group; int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */ /* Try to parse the argument in each parser. */ @@ -726,7 +726,7 @@ parser_parse_opt (struct parser *parser, int opt, char *val) various starting positions in each group's SHORT_END field, we can determine which group OPT came from. */ { - struct group *group; + struct group_local *group; char *short_index = strchr (parser->short_opts, opt); if (short_index) @@ -938,7 +938,7 @@ __argp_input (const struct argp *argp, const struct argp_state *state) { if (state) { - struct group *group; + struct group_local *group; struct parser *parser = state->pstate; for (group = parser->groups; group < parser->egroup; group++)