summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-04-16 12:58:07 +0300
committerArnold D. Robbins <arnold@skeeve.com>2013-04-16 12:58:07 +0300
commit8b50259289e066f9a265a90a8aa81ada16da4065 (patch)
tree90b2fd0c469e09ad0330f117535e65c92b830a68
parent320be29f61ef7b61596f5fcd8e3568aebe0918a0 (diff)
downloadgawk-8b50259289e066f9a265a90a8aa81ada16da4065.tar.gz
Update getopt from glibc.
-rw-r--r--ChangeLog2
-rw-r--r--getopt.c25
-rw-r--r--getopt.h5
-rw-r--r--getopt1.c2
-rw-r--r--getopt_int.h3
5 files changed, 18 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index fb86f3d1..0b71c917 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,8 @@
* configure, Makefile.in, aclocal.m4, awklib/Makefile.in,
doc/Makefile.in, test/Makefile.in: Regenerated.
+ * getopt.c, getopt.h, getopt1.c, getopt_int.h: Sync with GLIBC.
+
2013-04-14 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (check_funcs): Fix logic of test for called but
diff --git a/getopt.c b/getopt.c
index d0996d4a..e27848da 100644
--- a/getopt.c
+++ b/getopt.c
@@ -2,8 +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,2008,2009,2010,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -614,19 +613,19 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
fputc_unlocked ('\n', fp);
if (__builtin_expect (fclose (fp) != EOF, 1))
- {
- _IO_flockfile (stderr);
+ {
+ _IO_flockfile (stderr);
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
- __fxprintf (NULL, "%s", buf);
+ __fxprintf (NULL, "%s", buf);
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
- free (buf);
- }
+ free (buf);
+ }
}
#else
fprintf (stderr,
@@ -1106,8 +1105,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
}
no_longs:
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
diff --git a/getopt.h b/getopt.h
index 82d0ab9e..5d19cb3d 100644
--- a/getopt.h
+++ b/getopt.h
@@ -1,6 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -158,7 +157,7 @@ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
helps to also do this at runtime. */
# ifdef __REDIRECT
extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
- const char *__shortopts),
+ const char *__shortopts),
__posix_getopt);
# else
extern int __posix_getopt (int ___argc, char *const *___argv,
diff --git a/getopt1.c b/getopt1.c
index 03fba35e..8be96571 100644
--- a/getopt1.c
+++ b/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994,1996-1998,2004,2009 Free Software Foundation, Inc.
+ Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/getopt_int.h b/getopt_int.h
index b0d7695a..92f3871e 100644
--- a/getopt_int.h
+++ b/getopt_int.h
@@ -1,6 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or