summaryrefslogtreecommitdiff
path: root/cat/bsdcat.h
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2014-10-12 14:04:25 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2014-10-12 14:10:45 +0900
commit15bcb6785945ee51218ee70a1ceaac595891b943 (patch)
tree01a2b34cff9c3865856776e37071a1a6a3086f09 /cat/bsdcat.h
parent359f8c0a359884c24d848b52cad6cf4bd13282b8 (diff)
downloadlibarchive-15bcb6785945ee51218ee70a1ceaac595891b943.tar.gz
Fix build failure on Windows.
- Visual Studio does not provide unistd.h - Visual Studio does not provide getopt - Increase portability
Diffstat (limited to 'cat/bsdcat.h')
-rw-r--r--cat/bsdcat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cat/bsdcat.h b/cat/bsdcat.h
index 227e01ac..ca603d3d 100644
--- a/cat/bsdcat.h
+++ b/cat/bsdcat.h
@@ -34,6 +34,22 @@
#include <archive.h>
#include <archive_entry.h>
+struct bsdcat {
+ /* Option parser state */
+ int getopt_state;
+ char *getopt_word;
+
+ /* Miscellaneous state information */
+ int argc;
+ char **argv;
+ const char *argument;
+};
+
+enum {
+ OPTION_VERSION
+};
+
+int bsdcat_getopt(struct bsdcat *);
void usage(FILE *stream, int eval);
void bsdcat_next(void);
void bsdcat_print_error(void);