| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: getopt.h,v 1.4 2005/03/10 19:19:47 tv Exp $ */ | | 1 | /* $NetBSD: getopt.h,v 1.5 2008/02/22 01:27:55 tnn Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Dieter Baron and Thomas Klausner. | | 8 | * by Dieter Baron and Thomas Klausner. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -62,21 +62,27 @@ struct option { | | | @@ -62,21 +62,27 @@ struct option { |
62 | /* if flag not NULL, value to set *flag to; else return value */ | | 62 | /* if flag not NULL, value to set *flag to; else return value */ |
63 | int val; | | 63 | int val; |
64 | }; | | 64 | }; |
65 | | | 65 | |
66 | #ifdef __cplusplus | | 66 | #ifdef __cplusplus |
67 | extern "C" { | | 67 | extern "C" { |
68 | #endif | | 68 | #endif |
69 | | | 69 | |
70 | int getopt_long(int, char * const *, const char *, | | 70 | int getopt_long(int, char * const *, const char *, |
71 | const struct option *, int *); | | 71 | const struct option *, int *); |
72 | | | 72 | |
73 | /* On some platforms, this is in libc, but not in a system header */ | | 73 | /* On some platforms, this is in libc, but not in a system header */ |
74 | extern int optreset; | | 74 | extern int optreset; |
| | | 75 | #ifdef __sgi |
| | | 76 | extern char *optarg; |
| | | 77 | extern int opterr; |
| | | 78 | extern int optind; |
| | | 79 | extern int optopt; |
| | | 80 | #endif |
75 | | | 81 | |
76 | #ifdef __cplusplus | | 82 | #ifdef __cplusplus |
77 | }; | | 83 | }; |
78 | #endif | | 84 | #endif |
79 | | | 85 | |
80 | #endif | | 86 | #endif |
81 | | | 87 | |
82 | #endif /* !_GETOPT_H_ */ | | 88 | #endif /* !_GETOPT_H_ */ |