summaryrefslogtreecommitdiff
path: root/thirdparty/lws/win32helpers/getopt.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-02-07 01:05:04 +0100
committerGitHub <noreply@github.com>2018-02-07 01:05:04 +0100
commitb0a73077cb8395ad39124dd08490195adbfb90c9 (patch)
tree974b5c9302fd98f4a4a69dec9e57ad08297cfd12 /thirdparty/lws/win32helpers/getopt.h
parent3cb1b2227ff211cd06e4929b2b1e8d775a0937fd (diff)
parentf3abd4a0652152956d1ceaed491694aaacd9ccf3 (diff)
Merge pull request #14888 from Faless/websocket
Websocket module
Diffstat (limited to 'thirdparty/lws/win32helpers/getopt.h')
-rw-r--r--thirdparty/lws/win32helpers/getopt.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/thirdparty/lws/win32helpers/getopt.h b/thirdparty/lws/win32helpers/getopt.h
new file mode 100644
index 0000000000..7137f0379c
--- /dev/null
+++ b/thirdparty/lws/win32helpers/getopt.h
@@ -0,0 +1,33 @@
+#ifndef __GETOPT_H__
+#define __GETOPT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int opterr; /* if error message should be printed */
+extern int optind; /* index into parent argv vector */
+extern int optopt; /* character checked for validity */
+extern int optreset; /* reset getopt */
+extern char *optarg; /* argument associated with option */
+
+struct option
+{
+ const char *name;
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+int getopt(int, char**, char*);
+int getopt_long(int, char**, char*, struct option*, int*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GETOPT_H__ */