/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
# endif
#endif
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
+# if !GNULIB_defined_struct_option
struct option
{
const char *name;
int *flag;
int val;
};
+# define GNULIB_defined_struct_option 1
+# endif
/* Names for the values of the `has_arg' field of `struct option'. */
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
#endif