Commit 706bae5c authored by jani@hynda.(none)'s avatar jani@hynda.(none)
Browse files

A compatibility fix in my_getopt for boolean variables. All of

these work now and do the same thing: --lower-case-table-names,
--lower-case-table-names=1, -O lower-case-table-names=1,
--set-variable=lower-case-table-names=1
parent a5edb200
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -50265,6 +50265,9 @@ each individual 4.0.x release.
@appendixsubsec Changes in release 4.0.3 (Aug 2002: Beta)
@itemize @bullet
@item Fixed all boolean type variables to work with the old syntax,
e.g. all of these work: --lower-case-table-names, --lower-case-table-names=1,
-O lower-case-table-names=1, --set-variable=lower-case-table-names=1
@item
Fixed shutdown problem (SIGTERM signal handling) on Solaris. (Bug from 4.0.2).
@item
+2 −2
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ int handle_options(int *argc, char ***argv,
	    return EXIT_AMBIGUOUS_OPTION;
	  }
	}
	if (must_be_var && (!optp->value || optp->var_type == GET_BOOL))
	if (must_be_var && !optp->value)
	{
	  if (my_getopt_print_errors)
	    fprintf(stderr, "%s: option '%s' cannot take an argument\n",
@@ -278,7 +278,7 @@ int handle_options(int *argc, char ***argv,
	}
	if (optp->arg_type == NO_ARG)
	{
	  if (optend && !special_used)
	  if (optend && special_used)
	  {
	    if (my_getopt_print_errors)
	      fprintf(stderr, "%s: option '--%s' cannot take an argument\n",