-#ifdef HAVE_GETSUBOPT
-
-int dummy;
-
-#else
-
+/* $Id: compat_getsubopt.c,v 1.6 2020/06/15 01:37:15 schwarze Exp $ */
/* $OpenBSD: getsubopt.c,v 1.4 2005/08/08 08:05:36 espie Exp $ */
/*-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include "config.h"
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
-/*
- * 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;
return(cnt);
return(-1);
}
-
-#endif