#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
-#include <unistd.h>
#if defined __OpenBSD__
#include <unistd.h>
context = g_new0 (GOptionContext, 1);
context->parameter_string = g_strdup (parameter_string);
- {
- const char *argv[] = { "./a", "a", "-a", NULL };
- /* Check to see if getopt will parse the "-a" or not. If it finds
- * no arguments then we are in strict POSIX mode.
- */
- optind = 1;
- context->strict_posix = getopt (3, (char **) argv, "a") != 'a';
- }
+ context->strict_posix = FALSE;
context->help_enabled = TRUE;
context->ignore_unknown = FALSE;
*
* Sets strict POSIX mode.
*
+ * By default, this mode is disabled.
+ *
* In strict POSIX mode, the first non-argument parameter encountered
* (eg: filename) terminates argument processing. Remaining arguments
* are treated as non-options and are not attempted to be parsed.
* will list "foo" in long mode. In strict POSIX style, this will list
* the files named "foo" and "-l".
*
- * The default is system-dependent. In particular, on some systems, it
- * may be modified by the POSIXLY_CORRECT environment variable.
- *
* It may be useful to force strict POSIX mode when creating "verb
* style" command line tools. For example, the "gsettings" command line
* tool supports the global option "--schemadir" as well as many