aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-05-13 22:20:48 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-05-13 22:20:48 +0000
commit792aeb926e766f8688e534a5803b93283f26627c (patch)
tree3401849fc41b9c23680f0512aa92b55e6a9155fd /tmux.h
parent88daeb5410bb3f5f981630b5658f92abb5d3979b (diff)
downloadrtmux-792aeb926e766f8688e534a5803b93283f26627c.tar.gz
rtmux-792aeb926e766f8688e534a5803b93283f26627c.tar.bz2
rtmux-792aeb926e766f8688e534a5803b93283f26627c.zip
Use getopt.c from openssh rather than OpenBSD's getopt_long.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/tmux.h b/tmux.h
index a6f589d3..b60ec19b 100644
--- a/tmux.h
+++ b/tmux.h
@@ -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;