=================================================================== RCS file: /cvs/mandoc/compat_getsubopt.c,v retrieving revision 1.2 retrieving revision 1.6 diff -u -p -r1.2 -r1.6 --- mandoc/compat_getsubopt.c 2011/12/18 14:27:01 1.2 +++ mandoc/compat_getsubopt.c 2020/06/15 01:37:15 1.6 @@ -1,15 +1,6 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +/* $Id: compat_getsubopt.c,v 1.6 2020/06/15 01:37:15 schwarze Exp $ */ +/* $OpenBSD: compat_getsubopt.c,v 1.6 2020/06/15 01:37:15 schwarze Exp $ */ -#ifdef HAVE_GETSUBOPT - -int dummy; - -#else - -/* $OpenBSD: compat_getsubopt.c,v 1.2 2011/12/18 14:27:01 kristaps Exp $ */ - /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -38,23 +29,17 @@ int dummy; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +#include "config.h" #include #include #include -/* - * The SVID interface to getsubopt provides no way of figuring out which - * part of the suboptions list wasn't matched. This makes error messages - * tricky... The extern variable suboptarg is a pointer to the token - * which didn't match. - */ -char *suboptarg; - int getsubopt(char **optionp, char * const *tokens, char **valuep) { int cnt; + char *suboptarg; char *p; suboptarg = *valuep = NULL; @@ -100,5 +85,3 @@ getsubopt(char **optionp, char * const *tokens, char * return(cnt); return(-1); } - -#endif