# HG changeset patch # User Michael Goffioul # Date 1361458282 0 # Node ID ec15ef10261d31248abf07ad79da09c8b677c1c5 # Parent fea72d94801364b1bde7cdf83237a49fe4db508a# Parent e6a6fd004283badd7f69d02db7eb1560fb198865 pull and merge upstream changes to default branch diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,43 @@ +2013-02-19 Paul Eggert + + mountlist: port to HP NonStop + Reported by Joachim Schmitz in + . + * lib/mountlist.c (hasmntopt) [!HAVE_HASMNTOPT]: New function. + (MNT_IGNORE) [MNTOPT_IGNORE]: Use it. + +2013-02-18 Paul Eggert + + extern-inline: avoid compilation error with HP-UX cc + Reported by Richard Lloyd in + . + * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): + Suppress extern inline with HP-UX cc. This should be safe, + though it may hurt performance. Perhaps someone with some HP-UX + experience can come up with a higher-performance fix. + +2013-02-14 Paul Eggert + + putenv: fix heap corruption with mixed putenv/_putenv + Problem reported by Michael Goffioul in + . + * lib/putenv.c (putenv) [HAVE__PUTENV]: + Rely on _putenv to allocate the new environment. + * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro. + * modules/putenv (configure.ac): Use it. + +2013-02-11 Paul Eggert + + unsetenv etc.: port to Solaris 11 + GNU Emacs + * lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c: + * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c: + * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including . + GNU Emacs's includes (which is not a great + idea but is too painful to fix right now), and without this gnulib + change was defining _GL_ARG_NONNULL incorrectly when + compiling unsetenv.c on Solaris 11. Fix the problem for + unsetenv.c, and fix other similar occurrences. + 2013-02-09 Paul Eggert secure_getenv: fix C++ declaration typo diff --git a/build-aux/config.guess b/build-aux/config.guess --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-02-04' +timestamp='2013-02-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -953,6 +953,9 @@ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; diff --git a/build-aux/config.sub b/build-aux/config.sub --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-02-04' +timestamp='2013-02-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -296,7 +296,7 @@ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -1589,6 +1589,9 @@ mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/doc/Copyright/disclaim.manual b/doc/Copyright/disclaim.manual --- a/doc/Copyright/disclaim.manual +++ b/doc/Copyright/disclaim.manual @@ -5,7 +5,7 @@ I, , hereby disclaim all copyright interest in my manual which does . - I affirm that I have no other intellectual property interest + I affirm that I have no other proprietary interest that would undermine this release, and will do nothing to undermine it in the future. I represent that the work is my own and not a copy of someone else's work. @@ -27,37 +27,42 @@ authorized to license software produced there will do. Here is a sample wording: - Digital Stimulation Corporation hereby disclaims all copyright interest - in the manual "seduce.tex" written by Hugh Heffner, including both the + Yoyodyne, Inc. hereby disclaims all copyright interest + in the manual "sample.tex" written by Hugh Hacker, including both the present version of the program and his/her future changes and enhancements to it. We do not consider it or them as a work made for hire for us. - Digital Stimulation Corporation affirms that it has no other - intellectual property interest that would undermine this release, + Yoyodyne, Inc. affirms that it has no other + proprietary interest that would undermine this release, and will do nothing to undermine it in the future. - , 1 April 1987 - Ty Coon, President of Vice, Digital Stimulation Corp. + , 1 April 1987 + Moe Ghoul, President of Vice, Yoyodyne, Inc. -If your employer says they do have an intellectual property claim that -could conflict with the use of the manual, then please put me in touch -with a suitable representative of the company, so that we can -negotiate what to do about it. +If your employer says they do have a claim that could conflict with the +use of the manual, then please put me in touch with a suitable +representative of the company, so that we can negotiate what to do +about it. IMPORTANT: When you talk to your employer, *no matter what instructions they have given you*, don't fail to show them the sample disclaimer above, or a disclaimer with the details filled in for your specific case. Companies are usually willing to sign a disclaimer without any fuss. If you make your request less specific, you may -open Pandora's box and cause a long and unnecessary delay. +create spurious anxieties about issues that don't pertain to the +real situation. That could cause a long and unnecessary delay. -Please snail the signed disclaimers to: +Please send a scanned copy of the signed disclaimers to +. -Attn: Disclaimer Clerk +You can also fax the forms to +1-617-542-2652, or send the forms via the +postal mail to: + +Attn: Copyright Administrator Free Software Foundation -59 Temple Place, Suite 330 -Boston, MA 02111-1307 -USA +51 Franklin Street, 5th Floor +Boston, MA 02110, USA + Please print your email address on the printed disclaimer. diff --git a/doc/maintain.texi b/doc/maintain.texi --- a/doc/maintain.texi +++ b/doc/maintain.texi @@ -5,7 +5,7 @@ @c For double-sided printing, uncomment: @c @setchapternewpage odd @c This date is automagically updated when you save this file: -@set lastupdate January 10, 2013 +@set lastupdate February 13, 2013 @c %**end of header @dircategory GNU organization @@ -174,10 +174,11 @@ The directory @file{/gd/gnuorg} mentioned throughout this document is available on the general GNU server, currently @code{fencepost.gnu.org}. If you are the maintainer of a GNU package, -you should have an account there. If you don't have one already, +you should have an account there. If you don't have one already, see @url{http://www.gnu.org/software/README.accounts.html}. You can also ask for accounts for people who significantly help you in working on -the package. +the package. Such GNU login accounts include email +(see @url{http://www.fsf.org/about/systems/sending-mail-via-fencepost}). @end macro @gdgnuorgtext{} @@ -929,7 +930,8 @@ Please adjust the list of invariant sections as appropriate for your manual. If there are none, then say ``with no Invariant Sections''. If your manual is not published by the FSF, and under 400 pages, you -can omit both cover texts. +can omit both cover texts. However, if it is copyright FSF, always +ask the FSF what to do. @xref{GNU Sample Texts,,, texinfo, Texinfo}, for a full example in a Texinfo manual, and see @@ -2289,6 +2291,18 @@ serious about the need for free documentation, we must not contradict our position by recommending use of documentation that isn't free. +Please don't host discussions about your package in a service that +requires nonfree software. For instance, Google+ ``communities'' +require running a nonfree Javascript program to post a message, so +they can't be used in the Free World. To host discussions there would +be excluding people who live by free software principles. + +Of course, you can't order people not to use such services to talk +with each other. What you can do is not legitimize them, and use your +influence to lead people away from them. For instance, where you say +where to have discussions related to the program, don't list such a +place. + Finally, new issues concerning the ethics of software freedom come up frequently. We ask that GNU maintainers, at least on matters that pertain specifically to their package, stand with the rest of the GNU @@ -2540,9 +2554,14 @@ developers should not use a service that requires them to sign a proprietary software license, such as Google's payment service. -Of course, it is also good to encourage people to join or contribute -to the FSF (@url{http://www.fsf.org}), either instead of or as well as -package-specific donations. +The FSF can collect donations for a limited number of projects; if you +want to propose that for your project, write to +@email{maintainers@@gnu.org}. The FSF is required to supervise the +spending of these funds. + +Of course, it is also good to encourage people to join the FSF +(@url{http://www.fsf.org}) or make a general donation, either instead +of or as well as package-specific donations. @node Free Software Directory diff --git a/doc/posix-headers/stdnoreturn.texi b/doc/posix-headers/stdnoreturn.texi --- a/doc/posix-headers/stdnoreturn.texi +++ b/doc/posix-headers/stdnoreturn.texi @@ -28,6 +28,7 @@ compiler is not informed whether @code{noreturn} functions do not return, so it may generate incorrect warnings at compile-time, or code that is slightly less optimized. This problem does not occur with +@code{_Noreturn}. @item Circa 2012 bleeding-edge GCC with @code{-Werror=old-style-declaration} requires @code{_Noreturn} or @code{noreturn} before the returned type diff --git a/doc/standards.texi b/doc/standards.texi --- a/doc/standards.texi +++ b/doc/standards.texi @@ -3,7 +3,7 @@ @setfilename standards.info @settitle GNU Coding Standards @c This date is automagically updated when you save this file: -@set lastupdate January 1, 2013 +@set lastupdate February 13, 2013 @c %**end of header @dircategory GNU organization @@ -901,7 +901,6 @@ mode). Once you are doing the work to provide the functionality and the graphical interface, these won't be much extra work. - @node Command-Line Interfaces @section Standards for Command Line Interfaces @cindex command-line interface diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -16,16 +16,16 @@ along with this program. If not, see . */ #ifndef _LIBC +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the name == NULL test below. */ +# define _GL_ARG_NONNULL(params) + # define _GL_USE_STDLIB_ALLOC 1 # include #endif #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - /* Specification. */ #include diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -15,12 +15,12 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ -#include - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the sa == NULL test below. */ #define _GL_ARG_NONNULL(params) +#include + #include #if HAVE_NETINET_IN_H diff --git a/lib/getdelim.c b/lib/getdelim.c --- a/lib/getdelim.c +++ b/lib/getdelim.c @@ -17,12 +17,12 @@ /* Ported from glibc by Simon Josefsson. */ -#include - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ #define _GL_ARG_NONNULL(params) +#include + #include #include diff --git a/lib/glob.c b/lib/glob.c --- a/lib/glob.c +++ b/lib/glob.c @@ -15,13 +15,12 @@ along with this program. If not, see . */ #ifndef _LIBC +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the pattern == NULL || pglob == NULL tests below. */ +# define _GL_ARG_NONNULL(params) # include #endif -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the pattern == NULL || pglob == NULL tests below. */ -#define _GL_ARG_NONNULL(params) - #include #include diff --git a/lib/mountlist.c b/lib/mountlist.c --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -128,8 +128,12 @@ # include #endif +#ifndef HAVE_HASMNTOPT +# define hasmntopt(mnt, opt) ((char *) 0) +#endif + #undef MNT_IGNORE -#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT +#ifdef MNTOPT_IGNORE # define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE) #else # define MNT_IGNORE(M) 0 diff --git a/lib/putenv.c b/lib/putenv.c --- a/lib/putenv.c +++ b/lib/putenv.c @@ -115,6 +115,37 @@ if (*ep == NULL) { +#if HAVE__PUTENV + /* Rely on _putenv to allocate the new environment. If other + parts of the application use _putenv, the !HAVE__PUTENV code + would fight over who owns the environ vector, causing a crash. */ + if (name_end[1]) + return _putenv (string); + else + { + /* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME=x") + to allocate the environ vector and then replace the new + entry with "NAME=". */ + int putenv_result, putenv_errno; + char *name_x = malloc (name_end - string + sizeof "=x"); + if (!name_x) + return -1; + memcpy (name_x, string, name_end - string + 1); + name_x[name_end - string + 1] = 'x'; + name_x[name_end - string + 2] = 0; + putenv_result = _putenv (name_x); + putenv_errno = errno; + for (ep = environ; *ep; ep++) + if (*ep == name_x) + { + *ep = string; + break; + } + free (name_x); + __set_errno (putenv_errno); + return putenv_result; + } +#else static char **last_environ = NULL; char **new_environ = (char **) malloc ((size + 2) * sizeof (char *)); if (new_environ == NULL) @@ -126,6 +157,7 @@ free (last_environ); last_environ = new_environ; environ = new_environ; +#endif } else *ep = string; diff --git a/lib/random_r.c b/lib/random_r.c --- a/lib/random_r.c +++ b/lib/random_r.c @@ -50,13 +50,13 @@ * Rewritten to be reentrant by Ulrich Drepper, 1995 */ -#include - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the buf == NULL, arg_state == NULL, result == NULL tests below. */ #define _GL_ARG_NONNULL(params) +#include + /* Specification. */ #include diff --git a/lib/setenv.c b/lib/setenv.c --- a/lib/setenv.c +++ b/lib/setenv.c @@ -15,14 +15,14 @@ along with this program. If not, see . */ #if !_LIBC +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the name == NULL test below. */ +# define _GL_ARG_NONNULL(params) + # define _GL_USE_STDLIB_ALLOC 1 # include #endif -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - #include /* Specification. */ diff --git a/lib/tsearch.c b/lib/tsearch.c --- a/lib/tsearch.c +++ b/lib/tsearch.c @@ -85,12 +85,12 @@ In this case, A has been rotated left. This preserves the ordering of the binary tree. */ -#include - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the rootp == NULL tests below. */ #define _GL_ARG_NONNULL(params) +#include + /* Specification. */ #ifdef IN_LIBINTL # include "tsearch.h" diff --git a/lib/unsetenv.c b/lib/unsetenv.c --- a/lib/unsetenv.c +++ b/lib/unsetenv.c @@ -14,12 +14,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ #define _GL_ARG_NONNULL(params) +#include + /* Specification. */ #include diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -18,13 +18,16 @@ _GL_INLINE_HEADER_END contains useful stuff to put in the same include file, after uses of _GL_INLINE. + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + Suppress the use of extern inline on Apple's platforms, as Libc-825.25 (2012-09-19) is incompatible with it; see . Perhaps Apple will fix this some day. */ #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : 199901L <= __STDC_VERSION__) \ + : 199901L <= __STDC_VERSION__ && !defined __HP_cc) \ && !defined __APPLE__) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline diff --git a/m4/putenv.m4 b/m4/putenv.m4 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -48,3 +48,9 @@ ;; esac ]) + +# Prerequisites of lib/putenv.c. +AC_DEFUN([gl_PREREQ_PUTENV], +[ + AC_CHECK_FUNCS([_putenv]) +]) diff --git a/modules/putenv b/modules/putenv --- a/modules/putenv +++ b/modules/putenv @@ -14,6 +14,7 @@ gl_FUNC_PUTENV if test $REPLACE_PUTENV = 1; then AC_LIBOBJ([putenv]) + gl_PREREQ_PUTENV fi gl_STDLIB_MODULE_INDICATOR([putenv]) @@ -27,4 +28,3 @@ Maintainer: Jim Meyering, glibc -