Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / posix / getopt.h
blob49694a6c1bfca57664de3b258185f402b4cb9865
1 /*
2 * Copyright 2004-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _GETOPT_H
6 #define _GETOPT_H
9 #include <unistd.h>
12 /* This header defines the available GNU extensions to the getopt() functionality */
14 struct option {
15 const char *name;
16 int has_arg;
17 int *flag;
18 int val;
21 /* Options for the "has_arg" field */
23 #define no_argument 0
24 #define required_argument 1
25 #define optional_argument 2
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 extern int getopt_long(int argc, char * const *argv, const char *shortOptions,
33 const struct option *longOptions, int *_longIndex);
34 extern int getopt_long_only(int argc, char * const *argv, const char *shortOptions,
35 const struct option *longOptions, int *_longIndex);
37 #ifdef __cplusplus
39 #endif
41 #endif /* _GETOPT_H */