aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/getopt1.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/lib-src/getopt1.c b/lib-src/getopt1.c
index 9c8256567c4..60baeb85283 100644
--- a/lib-src/getopt1.c
+++ b/lib-src/getopt1.c
@@ -1,26 +1,32 @@
1/* getopt_long and getopt_long_only entry points for GNU getopt. 1/* getopt_long and getopt_long_only entry points for GNU getopt.
2 Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 2 Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 NOTE: The canonical source of this file is maintained with the GNU C Library. 4 This file is part of the GNU C Library.
5 Bugs can be reported to bug-glibc@gnu.org.
6 5
7 This program is free software; you can redistribute it and/or modify it 6 This program is free software; you can redistribute it and/or modify
8 under the terms of the GNU General Public License as published by the 7 it under the terms of the GNU General Public License as published by
9 Free Software Foundation; either version 2, or (at your option) any 8 the Free Software Foundation; either version 2, or (at your option)
10 later version. 9 any later version.
11 10
12 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 14 GNU General Public License for more details.
16 15
17 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License along
18 along with this program; if not, write to the Free Software Foundation, 17 with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 19
21#ifdef HAVE_CONFIG_H 20#ifdef HAVE_CONFIG_H
22#include <config.h> 21#include <config.h>
22#endif
23
24#ifdef _LIBC
25# include <getopt.h>
23#else 26#else
27# include "getopt.h"
28#endif
29
24#if !defined __STDC__ || !__STDC__ 30#if !defined __STDC__ || !__STDC__
25/* This is a separate conditional since some stdc systems 31/* This is a separate conditional since some stdc systems
26 reject `defined (const)'. */ 32 reject `defined (const)'. */
@@ -28,9 +34,6 @@
28#define const 34#define const
29#endif 35#endif
30#endif 36#endif
31#endif
32
33#include "getopt.h"
34 37
35#include <stdio.h> 38#include <stdio.h>
36 39
@@ -90,6 +93,10 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
90 return _getopt_internal (argc, argv, options, long_options, opt_index, 1); 93 return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
91} 94}
92 95
96# ifdef _LIBC
97libc_hidden_def (getopt_long)
98libc_hidden_def (getopt_long_only)
99# endif
93 100
94#endif /* Not ELIDE_CODE. */ 101#endif /* Not ELIDE_CODE. */
95 102
@@ -186,3 +193,4 @@ main (argc, argv)
186} 193}
187 194
188#endif /* TEST */ 195#endif /* TEST */
196