diff options
author | Angelo Mantellini <manangel@cisco.com> | 2019-02-05 08:50:26 +0100 |
---|---|---|
committer | Angelo Mantellini <manangel@cisco.com> | 2019-02-06 16:23:04 +0100 |
commit | 9f68541e0f55495d61dd9e583bec38740a247597 (patch) | |
tree | 55519e34159ac1eb691e080e4c1eab5b0e4847bd /libparc/parc/windows/getopt.h | |
parent | b77148ddc3def71e6c412c3afb5f1c20be2d77cd (diff) |
[HICN-26] Windows compatibilty for libparc
Change-Id: I6ebff82a81a2bf42fa3bf210ff0e6e530ce21915
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'libparc/parc/windows/getopt.h')
-rw-r--r-- | libparc/parc/windows/getopt.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libparc/parc/windows/getopt.h b/libparc/parc/windows/getopt.h new file mode 100644 index 00000000..6f0c19ee --- /dev/null +++ b/libparc/parc/windows/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**, const char*);
+int getopt_long(int, char**, const char*, const struct option*, int*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GETOPT_H__ */
|