1 |
/* getopt_long and getopt_long_only entry points for GNU getopt. |
/* getopt_long and getopt_long_only entry points for GNU getopt. |
2 |
Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. |
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 |
3 |
|
Free Software Foundation, Inc. |
4 |
NOTE: The canonical source of this file is maintained with the GNU C Library. |
This file is part of the GNU C Library. |
5 |
Bugs can be reported to bug-glibc@prep.ai.mit.edu. |
|
6 |
|
This program is free software; you can redistribute it and/or modify |
7 |
This program is free software; you can redistribute it and/or modify it |
it under the terms of the GNU General Public License as published by |
8 |
under the terms of the GNU General Public License as published by the |
the Free Software Foundation; either version 2, or (at your option) |
9 |
Free Software Foundation; either version 2, or (at your option) any |
any later version. |
|
later version. |
|
10 |
|
|
11 |
This program is distributed in the hope that it will be useful, |
This program is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
GNU General Public License for more details. |
GNU General Public License for more details. |
15 |
|
|
16 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License along |
17 |
along with this program; if not, write to the Free Software |
with this program; if not, write to the Free Software Foundation, |
18 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
|
USA. */ |
|
19 |
|
|
20 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
21 |
#include <config.h> |
#include <config.h> |
22 |
#endif |
#endif |
23 |
|
|
24 |
#include "getopt.h" |
#ifdef _LIBC |
25 |
|
# include <getopt.h> |
26 |
|
#else |
27 |
|
# include "getopt.h" |
28 |
|
#endif |
29 |
|
|
30 |
#if !defined (__STDC__) || !__STDC__ |
#if !defined __STDC__ || !__STDC__ |
31 |
/* This is a separate conditional since some stdc systems |
/* This is a separate conditional since some stdc systems |
32 |
reject `defined (const)'. */ |
reject `defined (const)'. */ |
33 |
#ifndef const |
#ifndef const |
46 |
it is simpler to just do this in the source for each such file. */ |
it is simpler to just do this in the source for each such file. */ |
47 |
|
|
48 |
#define GETOPT_INTERFACE_VERSION 2 |
#define GETOPT_INTERFACE_VERSION 2 |
49 |
#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 |
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 |
50 |
#include <gnu-versions.h> |
#include <gnu-versions.h> |
51 |
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION |
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION |
52 |
#define ELIDE_CODE |
#define ELIDE_CODE |
93 |
return _getopt_internal (argc, argv, options, long_options, opt_index, 1); |
return _getopt_internal (argc, argv, options, long_options, opt_index, 1); |
94 |
} |
} |
95 |
|
|
96 |
|
# ifdef _LIBC |
97 |
|
libc_hidden_def (getopt_long) |
98 |
|
libc_hidden_def (getopt_long_only) |
99 |
|
# endif |
100 |
|
|
101 |
#endif /* Not ELIDE_CODE. */ |
#endif /* Not ELIDE_CODE. */ |
102 |
|
|