Commit caf8a9b2 authored by Paul Eggert's avatar Paul Eggert

Merge from gnulib.

Fixes: debbugs:11527
parent fe453991
2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib. (Bug#11527)
The build procedure now creates <stdalign.h> and <sys/types.h> for
older hosts that lack a working <stdalign.h> or whose
<sys/types.h> does not define pid_t, size_t, ssize_t, mode_t. New
symbols such as WINDOWS_64_BIT_OFF_T may require attention in the
msdos and nt builds.
Here is a precis of gnulib changes that seem relevant; please see
the gnulib ChangeLog for details.
2012-05-18 crypto: fix bug in large buffer handling
2012-05-14 ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED
2012-05-10 _Noreturn: port config.h to gcc -Wundef
2012-05-08 warnings.m4: give a means to specify the program to compile
2012-05-07 stdint: be more consistent with glibc, SunOS libc
2012-04-21 Large File Support for native Windows platforms.
2012-04-14 stat: Bypass buggy override in mingw64.
2012-03-29 stdio: don't assume gets any more
2012-03-24 Enable common subexpression optimization in GCC.
2012-02-09 maint: replace FSF snail-mail addresses with URLs
2012-01-30 sys_stat: Fix support for mingw64 and MSVC.
2012-01-28 strtoimax: eliminate need for stdint.h, inttypes.h checks
2012-01-21 stdint: Add support for Android.
2012-01-15 Improve support for MSVC 9.
2012-01-08 mktime: Avoid compilation error on Solaris 11.
2012-01-05 Use ', not `, for quoting output.
2012-01-05 strtoimax: Don't replace systems where intmax_t is int.
2012-01-05 strtoimax: Work around AIX 5.1 bug.
2012-01-05 inttypes: Modernize.
2011-12-13 inttypes, stdint: add C++11 support
2011-11-26 Fix conflict between two instantiations of module 'unistd'.
2011-11-21 _Noreturn: Check that _MSC_VER is defined
2011-11-10 ptsname_r: Avoid compilation error on OSF/1 5.1.
2011-11-09 raise: fix mingw handling of SIGPIPE
2011-10-27 Add stdalign module and use it in other modules.
* lib/stdalign.in.h, lib/sys_types.in.h, m4/off_t.m4, m4/stdalign.m4:
* m4/sys_types_h.m4:
New files.
* build-aux/move-if-change, build-aux/snippet/_Noreturn.h:
* build-aux/snippet/arg-nonnull.h, build-aux/snippet/c++defs.h:
* build-aux/snippet/warn-on-use.h, doc/misc/texinfo.tex:
* lib/alloca.in.h, lib/allocator.h, lib/careadlinkat.c:
* lib/careadlinkat.h, lib/dosname.h, lib/dup2.c, lib/filemode.c:
* lib/filemode.h, lib/ftoastr.c, lib/ftoastr.h, lib/getloadavg.c:
* lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h:
* lib/gettext.h, lib/gnulib.mk, lib/ignore-value.h, lib/intprops.h:
* lib/inttypes.in.h, lib/lstat.c, lib/md5.c, lib/md5.h, lib/mktime.c:
* lib/pathmax.h, lib/pthread_sigmask.c, lib/readlink.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c, lib/sha512.h:
* lib/signal.in.h, lib/sigprocmask.c, lib/stat.c, lib/stdarg.in.h:
* lib/stdbool.in.h, lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/strftime.c, lib/strftime.h, lib/strtoimax.c:
* lib/strtol.c, lib/strtoll.c, lib/strtoul.c, lib/strtoull.c:
* lib/symlink.c, lib/sys_stat.in.h, lib/time.in.h, lib/time_r.c:
* lib/u64.h, lib/unistd.in.h, lib/verify.h, m4/00gnulib.m4:
* m4/alloca.m4, m4/c-strtod.m4, m4/dup2.m4, m4/extensions.m4:
* m4/filemode.m4, m4/getloadavg.m4, m4/getopt.m4, m4/gl-comp.m4:
* m4/gnulib-common.m4, m4/gnulib-tool.m4, m4/include_next.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/longlong.m4, m4/lstat.m4:
* m4/md5.m4, m4/mktime.m4, m4/multiarch.m4, m4/nocrash.m4:
* m4/pathmax.m4, m4/pthread_sigmask.m4, m4/readlink.m4, m4/sha1.m4:
* m4/sha256.m4, m4/sha512.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/socklen.m4, m4/ssize_t.m4, m4/st_dm_mode.m4, m4/stat.m4:
* m4/stdarg.m4, m4/stdbool.m4, m4/stddef_h.m4, m4/stdint.m4:
* m4/stdio_h.m4, m4/stdlib_h.m4, m4/strftime.m4, m4/strtoimax.m4:
* m4/strtoll.m4, m4/strtoull.m4, m4/strtoumax.m4, m4/symlink.m4:
* m4/sys_stat_h.m4, m4/time_h.m4, m4/time_r.m4, m4/tm_gmtoff.m4:
* m4/unistd_h.m4, m4/warnings.m4, m4/wchar_t.m4:
Update from gnulib.
2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
Remove src/m/*.
......
......@@ -2,13 +2,13 @@
# Like mv $1 $2, but if the files are the same, just delete $1.
# Status is zero if successful, nonzero otherwise.
VERSION='2011-01-28 20:09'; # UTC
VERSION='2012-01-06 07:23'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# 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
......@@ -32,7 +32,7 @@ If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
--help display this help and exit
--version output version information and exit
The variable CMPPROG can be used to specify an alternative to \`cmp'.
The variable CMPPROG can be used to specify an alternative to 'cmp'.
Report bugs to <bug-gnulib@gnu.org>."
......
#ifndef _Noreturn
#if !defined _Noreturn && __STDC_VERSION__ < 201112
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__))
......
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
......
/* C++ compatible function declaration macros.
Copyright (C) 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2010-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
......
/* A C macro for emitting warnings if a function is used.
Copyright (C) 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2010-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
......
This diff is collapsed.
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
......@@ -14,9 +14,9 @@
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
License along with this program; if not, see
<http://www.gnu.org/licenses/>.
*/
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
......
/* Memory allocators such as malloc+free.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
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
......
/* Read symbolic links into a buffer without size limitation, relative to fd.
Copyright (C) 2001, 2003-2004, 2007, 2009-2011 Free Software Foundation,
Copyright (C) 2001, 2003-2004, 2007, 2009-2012 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
......
/* Read symbolic links into a buffer without size limitation, relative to fd.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
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
......
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc.
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
......
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1999, 2004-2007, 2009-2012 Free Software Foundation, Inc.
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
......@@ -31,7 +31,7 @@
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
......
/* filemode.c -- make a string describing file modes
Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2011 Free
Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2012 Free
Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
......@@ -21,8 +21,8 @@
#include "filemode.h"
/* The following is for Cray DMF (Data Migration Facility), which is a
HSM file system. A migrated file has a `st_dm_mode' that is
different from the normal `st_mode', so any tests for migrated
HSM file system. A migrated file has a 'st_dm_mode' that is
different from the normal 'st_mode', so any tests for migrated
files should use the former. */
#if HAVE_ST_DM_MODE
# define IS_MIGRATED_FILE(statp) \
......
/* Make a string describing file modes.
Copyright (C) 1998-1999, 2003, 2006, 2009-2011 Free Software Foundation,
Copyright (C) 1998-1999, 2003, 2006, 2009-2012 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
......
/* floating point to accurate string
Copyright (C) 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2010-2012 Free Software Foundation, Inc.
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
......@@ -29,7 +29,6 @@
#include "ftoastr.h"
#include "intprops.h"
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
......
/* floating point to accurate string
Copyright (C) 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2010-2012 Free Software Foundation, Inc.
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
......@@ -58,7 +58,7 @@ enum
FTOASTR_ALWAYS_SIGNED = 2,
/* Output " " before positive numbers; ignored if
FTOASTER_ALWAYS_SIGNED is also given. */
FTOASTR_ALWAYS_SIGNED is also given. */
FTOASTR_SPACE_POSITIVE = 4,
/* Pad with zeros instead of spaces; ignored if FTOASTR_LEFT_JUSTIFY
......
/* Get the system load averages.
Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2011 Free Software
Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2012 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
......@@ -46,7 +46,7 @@
NLIST_STRUCT Include nlist.h, not a.out.h.
N_NAME_POINTER The nlist n_name element is a pointer,
not an array.
HAVE_STRUCT_NLIST_N_UN_N_NAME `n_un.n_name' is member of `struct nlist'.
HAVE_STRUCT_NLIST_N_UN_N_NAME 'n_un.n_name' is member of 'struct nlist'.
LINUX_LDAV_FILE [__linux__, __CYGWIN__]: File containing
load averages.
......@@ -794,7 +794,7 @@ getloadavg (double loadavg[], int nelem)
# define LDAV_DONE
/* This call can return -1 for an error, but with good args
it's not supposed to fail. The first argument is for no
apparent reason of type `long int *'. */
apparent reason of type 'long int *'. */
dg_sys_info ((long int *) &load_info,
DG_SYS_INFO_LOAD_INFO_TYPE,
DG_SYS_INFO_LOAD_VERSION_0);
......
......@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -41,15 +41,15 @@
# include <wchar.h>
#endif
/* This version of `getopt' appears to the caller like standard Unix `getopt'
/* This version of 'getopt' appears to the caller like standard Unix 'getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As `getopt_long' works, it permutes the elements of ARGV so that,
As 'getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
Using `getopt' or setting the environment variable POSIXLY_CORRECT
Using 'getopt' or setting the environment variable POSIXLY_CORRECT
disables permutation.
Then the behavior is completely standard.
......@@ -58,24 +58,24 @@
#include "getopt_int.h"
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
/* For communication from 'getopt' to the caller.
When 'getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
and for communication between successive calls to 'getopt'.
On entry to `getopt', zero means this is the first call; initialize.
On entry to 'getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* 1003.2 says this must be 1 before any call. */
......@@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags;
The other is elements [last_nonopt,optind), which contains all
the options processed since those non-options were skipped.
`first_nonopt' and `last_nonopt' are relocated so that they describe
'first_nonopt' and 'last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
static void
......@@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d)
but it consists of two parts that need to be swapped next. */
#if defined _LIBC && defined USE_NONOPTION_FLAGS
/* First make sure the handling of the `__getopt_nonoption_flags'
/* First make sure the handling of the '__getopt_nonoption_flags'
string can work normally. Our top argument must be in the range
of the string. */
if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
......@@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED,
If an element of ARGV starts with '-', and is not exactly "-" or "--",
then it is an option element. The characters of this element
(aside from the initial '-') are option characters. If `getopt'
(aside from the initial '-') are option characters. If 'getopt'
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
If `getopt' finds another option character, it returns that character,
updating `optind' and `nextchar' so that the next call to `getopt' can
If 'getopt' finds another option character, it returns that character,
updating 'optind' and 'nextchar' so that the next call to 'getopt' can
resume the scan with the following option character or ARGV-element.
If there are no more option characters, `getopt' returns -1.
Then `optind' is the index in ARGV of the first ARGV-element
If there are no more option characters, 'getopt' returns -1.
Then 'optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
OPTSTRING is a string containing the legitimate option characters.
If an option character is seen that is not listed in OPTSTRING,
return '?' after printing an error message. If you set `opterr' to
return '?' after printing an error message. If you set 'opterr' to
zero, the error message is suppressed but we still return '?'.
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
so the following text in the same ARGV-element, or the text of the following
ARGV-element, is returned in `optarg'. Two colons mean an option that
ARGV-element, is returned in 'optarg'. Two colons mean an option that
wants an optional arg; if there is text in the current ARGV-element,
it is returned in `optarg', otherwise `optarg' is set to zero.
it is returned in 'optarg', otherwise 'optarg' is set to zero.
If OPTSTRING starts with `-' or `+', it requests different methods of
If OPTSTRING starts with '-' or '+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
Long-named options begin with `--' instead of `-'.
Long-named options begin with '--' instead of '-'.
Their names may be abbreviated as long as the abbreviation is unique
or is an exact match for some defined option. If they have an
argument, it follows the option name in the same ARGV-element, separated
from the option name by a `=', or else the in next ARGV-element.
When `getopt' finds a long-named option, it returns 0 if that option's
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
from the option name by a '=', or else the in next ARGV-element.
When 'getopt' finds a long-named option, it returns 0 if that option's
'flag' field is nonzero, the value of the option's 'val' field
if the 'flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an
LONGOPTS is a vector of 'struct option' terminated by an
element containing a name which is zero.
LONGIND returns the index in LONGOPT of the long-named option found.
......@@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
d->__last_nonopt = d->optind;
}
/* The special ARGV-element `--' means premature end of options.
/* The special ARGV-element '--' means premature end of options.
Skip it like a null option,
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
......@@ -788,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
char c = *d->__nextchar++;
const char *temp = strchr (optstring, c);
/* Increment `optind' when we start to process its last character. */
/* Increment 'optind' when we start to process its last character. */
if (*d->__nextchar == '\0')
++d->optind;
......@@ -887,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
return c;
}
else
/* We already incremented `d->optind' once;
/* We already incremented 'd->optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
......@@ -1114,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
c = '?';
}
else
/* We already incremented `optind' once;
/* We already incremented 'optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
d->__nextchar = NULL;
......@@ -1177,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char *optstring)
#ifdef TEST
/* Compile with -DTEST to make an executable for use in testing
the above definition of `getopt'. */
the above definition of 'getopt'. */
int
main (int argc, char **argv)
......
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -82,7 +82,7 @@
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
......@@ -128,29 +128,29 @@
extern "C" {
#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
/* For communication from 'getopt' to the caller.
When 'getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
and for communication between successive calls to 'getopt'.
On entry to `getopt', zero means this is the first call; initialize.
On entry to 'getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
/* Callers store zero here to inhibit the error message 'getopt' prints
for unrecognized options. */
extern int opterr;
......@@ -162,24 +162,24 @@ extern int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of `struct option' terminated by an element containing a name which is
of 'struct option' terminated by an element containing a name which is
zero.
The field `has_arg' is:
The field 'has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
If the field 'flag' is not NULL, it points to a variable that is set
to the value given in the field 'val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an `int' to
a compiled-in constant, such as set a value from `optarg', set the
option's `flag' field to zero and its `val' field to a nonzero
To have a long-named option do something other than set an 'int' to
a compiled-in constant, such as set a value from 'optarg', set the
option's 'flag' field to zero and its 'val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
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
......@@ -194,7 +194,7 @@ struct option
# define GNULIB_defined_struct_option 1
# endif
/* Names for the values of the `has_arg' field of `struct option'. */
/* Names for the values of the 'has_arg' field of 'struct option'. */
# define no_argument 0
# define required_argument 1
......@@ -208,23 +208,23 @@ struct option
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, `optopt' is set to the option letter, and '?' is
missing arguments, 'optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in `optarg'.
takes an argument, to be placed in 'optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU `getopt'.
optional. This behavior is specific to the GNU 'getopt'.
The argument `--' causes premature termination of argument
scanning, explicitly telling `getopt' that there are no more
The argument '--' causes premature termination of argument
scanning, explicitly telling 'getopt' that there are no more
options.
If OPTS begins with `-', then non-option arguments are treated as
If OPTS begins with '-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
`getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
......
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -141,11 +141,11 @@ main (int argc, char **argv)
break;
case 'c':
printf ("option c with value `%s'\n", optarg);
printf ("option c with value '%s'\n", optarg);
break;
case 'd':
printf ("option d with value `%s'\n", optarg);
printf ("option d with value '%s'\n", optarg);
break;
case '?':
......
/* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv,
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
variable POSIXLY_CORRECT, or using '+' as the first character
of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we
......@@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv,
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
with character code 1. Using `-' as the first character of the