Michael Perzl | 09fa5bc | 2011-07-13 18:43:57 +0200 | [diff] [blame^] | 1 | #if !(defined(_AIX) || defined(__hpux)) |
Cigy Cyriac | bf2e821 | 2010-08-10 19:51:11 -0400 | [diff] [blame] | 2 | |
| 3 | #include <getopt.h> |
| 4 | |
Michael Perzl | 09fa5bc | 2011-07-13 18:43:57 +0200 | [diff] [blame^] | 5 | #else /* _AIX || __hpux */ |
Cigy Cyriac | bf2e821 | 2010-08-10 19:51:11 -0400 | [diff] [blame] | 6 | |
| 7 | #ifndef _GETOPT_H |
| 8 | #define _GETOPT_H |
| 9 | |
| 10 | struct option { |
| 11 | const char *name; |
| 12 | int has_arg; |
| 13 | int *flag; |
| 14 | int val; |
| 15 | }; |
| 16 | |
| 17 | enum { |
| 18 | no_argument = 0, |
| 19 | required_argument = 1, |
| 20 | optional_argument = 2, |
| 21 | }; |
| 22 | |
| 23 | int getopt_long_only(int, char *const *, const char *, const struct option *, int *); |
| 24 | |
| 25 | #endif /* _GETOPT_H */ |
Michael Perzl | 09fa5bc | 2011-07-13 18:43:57 +0200 | [diff] [blame^] | 26 | #endif /* _AIX || __hpux */ |