From c14f0762b75cdca5321679d82ad81cb8c1ee7a6b Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Wed, 18 Sep 2002 01:09:10 +0000 Subject: [PATCH] Temporary getopt.h. MingW doesn't define getopt() anywhere, but ships with libiberty, that implements it. This file temporarily fills the gap svn path=/trunk/; revision=3519 --- reactos/include/getopt.h | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 reactos/include/getopt.h diff --git a/reactos/include/getopt.h b/reactos/include/getopt.h new file mode 100644 index 00000000000..43dc804d2fb --- /dev/null +++ b/reactos/include/getopt.h @@ -0,0 +1,53 @@ +/* temporary header for getopt. Please remove this file when MingW ships with + its own */ + +#ifndef __GETOPT_H_INCLUDED +#define __GETOPT_H_INCLUDED + +#ifdef __cplusplus +extern "C" +{ +#endif + +extern char *optarg; +extern int optind, opterr, optopt; + +#define no_argument (0) +#define required_argument (1) +#define optional_argument (2) + +struct option +{ + const char *name; + int has_arg; + int *flag; + int val; +}; + +extern int getopt(int, char * const [], const char *); + +extern int getopt_long +( + int, + char * const [], + const char *, + const struct option *, + int * +); + +extern int getopt_long_only +( + int, + char * const [], + const char *, + const struct option *, + int * +); + +#ifdef __cplusplus +} +#endif + +#endif /* __GETOPT_H_INCLUDED */ + +/* EOF */