diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-23 08:51:44 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-23 08:53:21 -0700 |
commit | e6d3eaa69871d800eb078580b64f2bc5806a0fcc (patch) | |
tree | 8bfe6653b6be56f06adee8e0cfbf2b366b8ac8a6 /lib/getopt.in.h | |
parent | e1392faae5c5cc7805b52efacbb25a71213afdeb (diff) | |
download | emacs-e6d3eaa69871d800eb078580b64f2bc5806a0fcc.tar.gz emacs-e6d3eaa69871d800eb078580b64f2bc5806a0fcc.tar.bz2 emacs-e6d3eaa69871d800eb078580b64f2bc5806a0fcc.zip |
Merge from gnulib
This incorporates:
2017-03-22 getopt: merge from glibc
* build-aux/config.sub, lib/getopt.c, lib/getopt.in.h:
* lib/getopt1.c, lib/getopt_int.h: Copy from gnulib.
* lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'lib/getopt.in.h')
-rw-r--r-- | lib/getopt.in.h | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 6cbad8e0339..3f57c68a25e 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -1,20 +1,20 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2017 Free Software - Foundation, Inc. + Copyright (C) 1989-2017 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 - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_GETOPT_H @@ -238,6 +238,25 @@ struct option extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); +#ifndef __GETOPT_PREFIX +# if defined __need_getopt && defined __USE_POSIX2 \ + && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU +/* The GNU getopt has more functionality than the standard version. The + additional functionality can be disable at runtime. This redirection + helps to also do this at runtime. */ +# ifdef __REDIRECT + extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, + const char *__shortopts), + __posix_getopt); +# else +extern int __posix_getopt (int ___argc, char *const *___argv, + const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); +# define getopt __posix_getopt +# endif +# endif +#endif + #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, |