1968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#ifndef ARES_GETOPT_H
2968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define ARES_GETOPT_H
3968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
4968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold/*
5968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * Copyright (c) 1987-2001 The Regents of the University of California.
6968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * All rights reserved.
7968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *
8968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * Redistribution and use in source and binary forms, with or without
9968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * modification, are permitted provided that the following conditions are met:
10968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *
11968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * A. Redistributions of source code must retain the above copyright notice,
12968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *    this list of conditions and the following disclaimer.
13968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * B. Redistributions in binary form must reproduce the above copyright notice,
14968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *    this list of conditions and the following disclaimer in the documentation
15968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *    and/or other materials provided with the distribution.
16968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * C. Neither the names of the copyright holders nor the names of its
17968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *    contributors may be used to endorse or promote products derived from this
18968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *    software without specific prior written permission.
19968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold *
20968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
24968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold * POSSIBILITY OF SUCH DAMAGE.
31968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold */
32968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
33968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
34968bf19396ad404e89420f5d67900fce13f4186cGilad Arnoldint ares_getopt(int nargc, char * const nargv[], const char *ostr);
35968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
36968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#undef optarg
37968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#undef optind
38968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#undef opterr
39968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#undef optopt
40968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#undef optreset
41968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
42968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define optarg   ares_optarg
43968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define optind   ares_optind
44968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define opterr   ares_opterr
45968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define optopt   ares_optopt
46968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#define optreset ares_optreset
47968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
48968bf19396ad404e89420f5d67900fce13f4186cGilad Arnoldextern char *optarg;
49968bf19396ad404e89420f5d67900fce13f4186cGilad Arnoldextern int optind;
50968bf19396ad404e89420f5d67900fce13f4186cGilad Arnoldextern int opterr;
51968bf19396ad404e89420f5d67900fce13f4186cGilad Arnoldextern int optopt;
52968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold
53968bf19396ad404e89420f5d67900fce13f4186cGilad Arnold#endif /* ARES_GETOPT_H */
54