1 --- mysql-4.1.10/mysys/my_getopt.c.orig 2005-02-12 21:37:32.000000000 +0100
2 +++ mysql-4.1.10/mysys/my_getopt.c 2005-03-04 10:52:33.000000000 +0100
4 static ulonglong getopt_ull(char *arg, const struct my_option *optp,
6 static void init_variables(const struct my_option *options);
7 -static int setval(const struct my_option *opts, gptr *value, char *argument,
8 +static int setval(const struct my_option *opts, gptr value, char *argument,
9 my_bool set_maximum_value);
10 static char *check_struct_option(char *cur_arg, char *key_name);
13 char **pos, **pos_end, *optend, *prev_found,
14 *opt_str, key_name[FN_REFLEN];
15 const struct my_option *optp;
22 Will set the option value to given value
25 -static int setval(const struct my_option *opts, gptr *value, char *argument,
26 +static int setval(const struct my_option *opts, gptr value, char *argument,
27 my_bool set_maximum_value)
31 if (value && argument)
33 - gptr *result_pos= ((set_maximum_value) ?
34 + gptr result_pos= ((set_maximum_value) ?
35 opts->u_max_value : value);
39 value Pointer to variable
42 -static void init_one_value(const struct my_option *option, gptr *variable,
43 +static void init_one_value(const struct my_option *option, gptr variable,
46 switch ((option->var_type & GET_TYPE_MASK)) {
48 set the value to default value.
50 if (options->u_max_value)
51 - init_one_value(options, options->u_max_value, options->max_value);
52 + init_one_value(options, (gptr)(options->u_max_value), options->max_value);
54 - init_one_value(options, options->value, options->def_value);
55 + init_one_value(options, (gptr)(options->value), options->def_value);
56 if (options->var_type & GET_ASK_ADDR &&
57 (variable= (*getopt_get_addr)("", 0, options)))
58 - init_one_value(options, variable, options->def_value);
59 + init_one_value(options, (gptr)variable, options->def_value);
64 printf("--------------------------------- -----------------------------\n");
65 for (optp= options; optp->id; optp++)
67 - gptr *value= (optp->var_type & GET_ASK_ADDR ?
68 + gptr value= (optp->var_type & GET_ASK_ADDR ?
69 (*getopt_get_addr)("", 0, optp) : optp->value);