From: Junio C Hamano Date: Tue, 21 Apr 2015 19:12:20 +0000 (-0700) Subject: Merge branch 'iu/fix-parse-options-h-comment' into maint X-Git-Tag: v2.3.6~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c84364abe3f7da3fdef67cc0f8762eabe2a71710?ds=inline;hp=-c Merge branch 'iu/fix-parse-options-h-comment' into maint * iu/fix-parse-options-h-comment: parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval --- c84364abe3f7da3fdef67cc0f8762eabe2a71710 diff --combined parse-options.h index 7940bc71af,6d19abd3ac..c71e9da4f8 --- a/parse-options.h +++ b/parse-options.h @@@ -95,8 -95,7 +95,7 @@@ typedef int parse_opt_ll_cb(struct pars * * `defval`:: * default value to fill (*->value) with for PARSE_OPT_OPTARG. - * OPTION_{BIT,SET_INT} store the {mask,integer,pointer} to put in - * the value when met. + * OPTION_{BIT,SET_INT} store the {mask,integer} to put in the value when met. * CALLBACKS can use it like they want. */ struct option { @@@ -140,7 -139,7 +139,7 @@@ { OPTION_CALLBACK, (s), (l), (v), N_("time"),(h), 0, \ parse_opt_approxidate_cb } #define OPT_EXPIRY_DATE(s, l, v, h) \ - { OPTION_CALLBACK, (s), (l), (v), N_("expiry date"),(h), 0, \ + { OPTION_CALLBACK, (s), (l), (v), N_("expiry-date"),(h), 0, \ parse_opt_expiry_date_cb } #define OPT_CALLBACK(s, l, v, a, h, f) \ { OPTION_CALLBACK, (s), (l), (v), (a), (h), 0, (f) } @@@ -176,8 -175,8 +175,8 @@@ extern NORETURN void usage_msg_opt(cons extern int optbug(const struct option *opt, const char *reason); extern int opterror(const struct option *opt, const char *reason, int flags); -#if defined(__GNUC__) && ! defined(__clang__) -#define opterror(o,r,f) (opterror((o),(r),(f)), -1) +#if defined(__GNUC__) +#define opterror(o,r,f) (opterror((o),(r),(f)), const_error()) #endif /*----- incremental advanced APIs -----*/