1 getopt.h is a modified version of the getopt.h found in the glibc snapshot
2 on 1998-04-14. Below the patch that has been applied to this file. The glibc
3 maintainer has been informed of these patches.
5 diff -c3 getopt.h.orig getopt.h
6 *** getopt.h.orig Sat Jun 21 03:01:53 1997
7 --- getopt.h Mon Aug 28 12:36:27 2000
10 /* Declarations for getopt.
11 ! Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
12 This file is part of the GNU C Library.
14 The GNU C Library is free software; you can redistribute it and/or
16 /* Declarations for getopt.
17 ! Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
18 This file is part of the GNU C Library.
20 The GNU C Library is free software; you can redistribute it and/or
26 ! #if defined (__STDC__) && __STDC__
34 ! #if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
40 #define required_argument 1
41 #define optional_argument 2
43 ! #if defined (__STDC__) && __STDC__
44 #ifdef __GNU_LIBRARY__
45 /* Many other libraries have conflicting prototypes for getopt, with
46 differences in the consts, in stdlib.h. To avoid compilation
48 #define required_argument 1
49 #define optional_argument 2
51 ! #if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
53 ! /* SunOS4 declares getopt with the following prototype:
54 ! extern int getopt (int argc, const char *const *argv, const char *shortopts);
55 ! We cannot redeclare it when compiling C++ code. */
56 ! #define getopt(x,y,z) getopt_long(x, y, z, (const struct option *) 0, (int *) 0)
57 ! #else /* not __cplusplus */
58 #ifdef __GNU_LIBRARY__
59 /* Many other libraries have conflicting prototypes for getopt, with
60 differences in the consts, in stdlib.h. To avoid compilation
64 #else /* not __GNU_LIBRARY__ */
66 #endif /* __GNU_LIBRARY__ */
67 + #endif /* __cplusplus */
68 extern int getopt_long (int argc, char *const *argv, const char *shortopts,
69 const struct option *longopts, int *longind);
70 extern int getopt_long_only (int argc, char *const *argv,