Use getopt.c from openssh rather than OpenBSD's getopt_long.

This commit is contained in:
Nicholas Marriott
2009-05-13 22:20:48 +00:00
parent 88daeb5410
commit 792aeb926e
5 changed files with 138 additions and 610 deletions

20
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.312 2009-05-04 17:58:27 nicm Exp $ */
/* $Id: tmux.h,v 1.313 2009-05-13 22:20:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -48,8 +48,6 @@
#ifndef BROKEN_GETOPT
#include <getopt.h>
#else
#include "compat/getopt.h"
#endif
#include <limits.h>
@ -1039,6 +1037,22 @@ int vasprintf(char **, const char *, va_list);
char *fgetln(FILE *, size_t *);
#endif
#ifdef BROKEN_GETOPT
/* getopt.c */
extern int BSDopterr;
extern int BSDoptind;
extern int BSDoptopt;
extern int BSDoptreset;
extern char *BSDoptarg;
int BSDgetopt(int, char *const *, const char *);
#define getopt(ac, av, o) BSDgetopt(ac, av, o)
#define opterr BSDopterr
#define optind BSDoptind
#define optopt BSDoptopt
#define optreset BSDoptreset
#define optarg BSDoptarg
#endif
/* tmux.c */
extern volatile sig_atomic_t sigwinch;
extern volatile sig_atomic_t sigterm;