autoupdate
[gnulib.git] / doc / standards.texi
index b42e15b..1847370 100644 (file)
@@ -3,12 +3,12 @@
 @setfilename standards.info
 @settitle GNU Coding Standards
 @c This date is automagically updated when you save this file:
-@set lastupdate April 23, 2006
+@set lastupdate March 28, 2011
 @c %**end of header
 
 @dircategory GNU organization
 @direntry
-* Standards: (standards).        GNU coding standards.
+* Standards: (standards).       GNU coding standards.
 @end direntry
 
 @c @setchapternewpage odd
 
 @c This is used by a cross ref in make-stds.texi
 @set CODESTD  1
-@iftex
-@set CHAPTER chapter
-@end iftex
-@ifinfo
-@set CHAPTER node
-@end ifinfo
 
 @copying
 The GNU coding standards, last updated @value{lastupdate}.
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no
-Front-Cover Texts, and with no Back-Cover Texts.
-A copy of the license is included in the section entitled ``GNU
-Free Documentation License''.
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
 @end copying
 
 @titlepage
@@ -56,22 +50,22 @@ Free Documentation License''.
 @contents
 
 @ifnottex
-@node Top, Preface, (dir), (dir)
-@top Version
+@node Top
+@top GNU Coding Standards
 
 @insertcopying
 @end ifnottex
 
 @menu
-* Preface::                     About the GNU Coding Standards
-* Legal Issues::                Keeping Free Software Free
-* Design Advice::               General Program Design
-* Program Behavior::            Program Behavior for All Programs
-* Writing C::                   Making The Best Use of C
-* Documentation::               Documenting Programs
-* Managing Releases::           The Release Process
-* References::                  References to Non-Free Software or Documentation
-* Copying This Manual::         How to Make Copies of This Manual
+* Preface::                     About the GNU Coding Standards.
+* Legal Issues::                Keeping free software free.
+* Design Advice::               General program design.
+* Program Behavior::            Program behavior for all programs
+* Writing C::                   Making the best use of C.
+* Documentation::               Documenting programs.
+* Managing Releases::           The release process.
+* References::                  Mentioning non-free software or documentation.
+* GNU Free Documentation License::  Copying and sharing this manual.
 * Index::
 
 @end menu
@@ -87,9 +81,6 @@ programs written in C, but many of the rules and principles are useful
 even if you write in another programming language.  The rules often
 state reasons for writing in a certain way.
 
-This release of the GNU Coding Standards was last updated
-@value{lastupdate}.
-
 @cindex where to obtain @code{standards.texi}
 @cindex downloading this manual
 If you did not obtain this file directly from the GNU project and
@@ -98,14 +89,32 @@ Coding Standards from the GNU web server in many
 different formats, including the Texinfo source, PDF, HTML, DVI, plain
 text, and more, at: @uref{http://www.gnu.org/prep/standards/}.
 
-Corrections or suggestions for this document should be sent to
-@email{bug-standards@@gnu.org}.  If you make a suggestion, please include a
-suggested new wording for it; our time is limited.  We prefer a context
-diff to the @file{standards.texi} or @file{make-stds.texi} files, but if
-you don't have those files, please mail your suggestion anyway.
+If you are maintaining an official GNU package, in addition to this
+document, please read and follow the GNU maintainer information
+(@pxref{Top, , Contents, maintain, Information for Maintainers of GNU
+Software}).
+
+@cindex @code{gnustandards-commit@@gnu.org} mailing list
+If you want to receive diffs for every change to these GNU documents,
+join the mailing list @code{gnustandards-commit@@gnu.org}, via the web
+interface at
+@url{http://lists.gnu.org/mailman/listinfo/gnustandards-commit}.
+Archives are also available there.
+
+@cindex @code{bug-standards@@gnu.org} email address
+@cindex Savannah repository for gnustandards
+@cindex gnustandards project repository
+Please send corrections or suggestions for this document to
+@email{bug-standards@@gnu.org}.  If you make a suggestion, please
+include a suggested new wording for it, to help us consider the
+suggestion efficiently.  We prefer a context diff to the Texinfo
+source, but if that's difficult for you, you can make a context diff
+for some other version of this document, or propose it in any way that
+makes it clear.  The source repository for this document can be found
+at @url{http://savannah.gnu.org/projects/gnustandards}.
 
 These standards cover the minimum of what is important when writing a
-GNU package.  Likely, the needs for additional standards will come up.
+GNU package.  Likely, the need for additional standards will come up.
 Sometimes, you might suggest that such standards be added to this
 document.  If you think your standards would be generally useful, please
 do suggest them.
@@ -120,6 +129,10 @@ The GNU Hello program serves as an example of how to follow the GNU
 coding standards for a trivial program.
 @uref{http://www.gnu.org/software/hello/hello.html}.
 
+This release of the GNU Coding Standards was last updated
+@value{lastupdate}.
+
+
 @node Legal Issues
 @chapter Keeping Free Software Free
 @cindex legal aspects
@@ -128,9 +141,9 @@ This chapter discusses how you can make sure that GNU software
 avoids legal difficulties, and other related issues.
 
 @menu
-* Reading Non-Free Code::       Referring to Proprietary Programs
-* Contributions::               Accepting Contributions
-* Trademarks::                  How We Deal with Trademark Issues
+* Reading Non-Free Code::       Referring to proprietary programs.
+* Contributions::               Accepting contributions.
+* Trademarks::                  How we deal with trademark issues.
 @end menu
 
 @node Reading Non-Free Code
@@ -149,7 +162,7 @@ irrelevant and dissimilar to your results.
 
 For example, Unix utilities were generally optimized to minimize
 memory use; if you go for speed instead, your program will be very
-different.  You could keep the entire input file in core and scan it
+different.  You could keep the entire input file in memory and scan it
 there instead of using stdio.  Use a smarter algorithm discovered more
 recently than the Unix program.  Eliminate use of temporary files.  Do
 it in one pass instead of two (we did this in the assembler).
@@ -265,10 +278,10 @@ account when designing your program.
 
 @menu
 * Source Language::             Which languages to use.
-* Compatibility::               Compatibility with other implementations
-* Using Extensions::            Using non-standard features
-* Standard C::                  Using Standard C features
-* Conditional Compilation::     Compiling Code Only If A Conditional is True
+* Compatibility::               Compatibility with other implementations.
+* Using Extensions::            Using non-standard features.
+* Standard C::                  Using standard C features.
+* Conditional Compilation::     Compiling code only if a conditional is true.
 @end menu
 
 @node Source Language
@@ -310,13 +323,17 @@ for a language that is higher level than C.  Often much of the program
 is written in that language, too.  The Emacs editor pioneered this
 technique.
 
-@cindex GUILE
-The standard extensibility interpreter for GNU software is GUILE
-(@uref{http://www.gnu.org/software/guile/}), which implements the
-language Scheme (an especially clean and simple dialect of Lisp).  We
-don't reject programs written in other ``scripting languages'' such as
-Perl and Python, but using GUILE is very important for the overall
-consistency of the GNU system.
+@cindex Guile
+@cindex GNOME and Guile
+The standard extensibility interpreter for GNU software is Guile
+(@uref{http://www.gnu.org/@/software/@/guile/}), which implements the
+language Scheme (an especially clean and simple dialect of Lisp).
+Guile also includes bindings for GTK+/GNOME, making it practical to
+write modern GUI functionality within Guile.  We don't reject programs
+written in other ``scripting languages'' such as Perl and Python, but
+using Guile is very important for the overall consistency of the GNU
+system.
+
 
 @node Compatibility
 @section Compatibility with Other Implementations
@@ -498,7 +515,7 @@ and is not always appropriate, following this policy would have saved
 GCC developers many hours, or even days, per year.
 
 In the case of function-like macros like @code{REVERSIBLE_CC_MODE} in
-GCC which cannot be simply used in @code{if...)} statements, there is
+GCC which cannot be simply used in @code{if (...)} statements, there is
 an easy workaround.  Simply introduce another macro
 @code{HAS_REVERSIBLE_CC_MODE} as in the following example:
 
@@ -520,15 +537,17 @@ command line interface, and how libraries should behave.
 @menu
 * Non-GNU Standards::           We consider standards such as POSIX;
                                   we don't "obey" them.
-* Semantics::                   Writing robust programs
-* Libraries::                   Library behavior
-* Errors::                      Formatting error messages
-* User Interfaces::             Standards about interfaces generally
-* Graphical Interfaces::        Standards for graphical interfaces
-* Command-Line Interfaces::     Standards for command line interfaces
-* Option Table::                Table of long options
-* Memory Usage::                When and how to care about memory needs
-* File Usage::                  Which files to use, and where
+* Semantics::                   Writing robust programs.
+* Libraries::                   Library behavior.
+* Errors::                      Formatting error messages.
+* User Interfaces::             Standards about interfaces generally.
+* Graphical Interfaces::        Standards for graphical interfaces.
+* Command-Line Interfaces::     Standards for command line interfaces.
+* Dynamic Plug-In Interfaces::  Standards for dynamic plug-in interfaces.
+* Option Table::                Table of long options.
+* OID Allocations::             Table of OID slots for GNU.
+* Memory Usage::                When and how to care about memory needs.
+* File Usage::                  Which files to use, and where.
 @end menu
 
 @node Non-GNU Standards
@@ -678,13 +697,18 @@ creating temporary files in world-writable directories.  In C, you can
 avoid this problem by creating temporary files in this manner:
 
 @example
-fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
+fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
 @end example
 
 @noindent
-or by using the @code{mkstemps} function from libiberty.
+or by using the @code{mkstemps} function from Gnulib
+(@pxref{mkstemps,,, gnulib, Gnulib}).
+
+In bash, use @code{set -C} (long name @code{noclobber}) to avoid this
+problem.  In addition, the @code{mktemp} utility is a more general
+solution for creating temporary files from shell scripts
+(@pxref{mktemp invocation,,, coreutils, GNU Coreutils}).
 
-In bash, use @code{set -C} to avoid this problem.
 
 @node Libraries
 @section Library Behavior
@@ -833,28 +857,37 @@ output device type.  For example, we provide a @code{dir} program much
 like @code{ls} except that its default output format is always
 multi-column format.
 
+
 @node Graphical Interfaces
 @section Standards for Graphical Interfaces
 @cindex graphical user interface
+@cindex interface styles
+@cindex user interface styles
 
-@cindex gtk+
+@cindex GTK+
 When you write a program that provides a graphical user interface,
-please make it work with X Windows and the GTK+ toolkit unless the
-functionality specifically requires some alternative (for example,
-``displaying jpeg images while in console mode'').
+please make it work with the X Window System and the GTK+ toolkit
+unless the functionality specifically requires some alternative (for
+example, ``displaying jpeg images while in console mode'').
 
 In addition, please provide a command-line interface to control the
 functionality.  (In many cases, the graphical user interface can be a
 separate program which invokes the command-line program.)  This is
 so that the same jobs can be done from scripts.
 
-@cindex corba
-@cindex gnome
-Please also consider providing a CORBA interface (for use from GNOME), a
-library interface (for use from C), and perhaps a keyboard-driven
-console interface (for use by users from console mode).  Once you are
-doing the work to provide the functionality and the graphical interface,
-these won't be much extra work.
+@cindex CORBA
+@cindex GNOME
+@cindex D-bus
+@cindex keyboard interface
+@cindex library interface
+Please also consider providing a D-bus interface for use from other
+running programs, such as within GNOME.  (GNOME used to use CORBA
+for this, but that is being phased out.)  In addition, consider
+providing a library interface (for use from C), and perhaps a
+keyboard-driven console interface (for use by users from console
+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
@@ -886,7 +919,7 @@ be input files only; any output files would be specified using options
 (preferably @samp{-o} or @samp{--output}).  Even if you allow an output
 file name as an ordinary argument for compatibility, try to provide an
 option as another way to specify it.  This will lead to more consistency
-among GNU utilities, and fewer idiosyncracies for users to remember.
+among GNU utilities, and fewer idiosyncrasies for users to remember.
 
 @cindex standard command-line options
 @cindex options, standard command-line
@@ -899,13 +932,21 @@ visiting @url{http://example.org/p.cgi/--help} in a browser should
 output the same information as invoking @samp{p.cgi --help} from the
 command line.
 
-@table @code
-@cindex @samp{--version} option
-@item --version
-This option should direct the program to print information about its name,
-version, origin and legal status, all on standard output, and then exit
-successfully.  Other options and arguments should be ignored once this
-is seen, and the program should not perform its normal function.
+@menu
+* --version::       The standard output for --version.
+* --help::          The standard output for --help.
+@end menu
+
+@node --version
+@subsection @option{--version}
+
+@cindex @samp{--version} output
+
+The standard @code{--version} option should direct the program to
+print information about its name, version, origin and legal status,
+all on standard output, and then exit successfully.  Other options and
+arguments should be ignored once this is seen, and the program should
+not perform its normal function.
 
 @cindex canonical name of a program
 @cindex program's canonical name
@@ -935,7 +976,7 @@ If the package has a version number which is different from this
 program's version number, you can mention the package version number
 just before the close-parenthesis.
 
-If you @strong{need} to mention the version numbers of libraries which
+If you @emph{need} to mention the version numbers of libraries which
 are distributed separately from the package which contains this program,
 you can do so by printing an additional line of version info for each
 library you want to mention.  Use the same format for these lines as for
@@ -950,10 +991,11 @@ The following line, after the version number line or lines, should be a
 copyright notice.  If more than one copyright notice is called for, put
 each on a separate line.
 
-Next should follow a brief statement that the program is free software,
-and that users are free to copy and change it on certain conditions.  If
-the program is covered by the GNU GPL, say so here.  Also mention that
-there is no warranty, to the extent permitted by law.
+Next should follow a line stating the license, preferably using one of
+abbrevations below, and a brief statement that the program is free
+software, and that users are free to copy and change it.  Also mention
+that there is no warranty, to the extent permitted by law.  See
+recommended wording below.
 
 It is ok to finish the output with a list of the major authors of the
 program, as a way of giving credit.
@@ -961,14 +1003,11 @@ program, as a way of giving credit.
 Here's an example of output that follows these rules:
 
 @smallexample
-GNU Emacs 19.34.5
-Copyright (C) 1996 Free Software Foundation, Inc.
-GNU Emacs comes with NO WARRANTY,
-to the extent permitted by law.
-You may redistribute copies of GNU Emacs
-under the terms of the GNU General Public License.
-For more information about these matters,
-see the files named COPYING.
+GNU hello 2.3
+Copyright (C) 2007 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
 @end smallexample
 
 You should adapt this to your program, of course, filling in the proper
@@ -980,7 +1019,7 @@ which changes were made---there's no need to list the years for previous
 versions' changes.  You don't have to mention the name of the program in
 these notices, if that is inconvenient, since it appeared in the first
 line.  (The rules are different for copyright notices in source files;
-see @ref{Copyright Notices,,,maintain,Information for GNU Maintainers}.)
+@pxref{Copyright Notices,,,maintain,Information for GNU Maintainers}.)
 
 Translations of the above lines must preserve the validity of the
 copyright notices (@pxref{Internationalization}).  If the translation's
@@ -999,23 +1038,133 @@ translate it into another language.  International treaties recognize
 the English word ``Copyright''; translations into other languages do not
 have legal significance.
 
+Finally, here is the table of our suggested license abbreviations.
+Any abbreviation can be followed by @samp{v@var{version}[+]}, meaning
+that particular version, or later versions with the @samp{+}, as shown
+above.
 
-@cindex @samp{--help} option
-@item --help
-This option should output brief documentation for how to invoke the
-program, on standard output, then exit successfully.  Other options and
-arguments should be ignored once this is seen, and the program should
-not perform its normal function.
+In the case of exceptions for extra permissions with the GPL, we use
+@samp{/} for a separator; the version number can follow the license
+abbreviation as usual, as in the examples below.
+
+@table @asis
+@item GPL
+GNU General Public License, @url{http://www.gnu.org/@/licenses/@/gpl.html}.
+
+@item LGPL
+GNU Lesser General Public License, @url{http://www.gnu.org/@/licenses/@/lgpl.html}.
+
+@item GPL/Ada
+GNU GPL with the exception for Ada.
+
+@item Apache
+The Apache Software Foundation license,
+@url{http://www.apache.org/@/licenses}.
+
+@item Artistic
+The Artistic license used for Perl, @url{http://www.perlfoundation.org/@/legal}.
+
+@item Expat
+The Expat license, @url{http://www.jclark.com/@/xml/@/copying.txt}.
+
+@item MPL
+The Mozilla Public License, @url{http://www.mozilla.org/@/MPL/}.
+
+@item OBSD
+The original (4-clause) BSD license, incompatible with the GNU GPL
+@url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#6}.
+
+@item PHP
+The license used for PHP, @url{http://www.php.net/@/license/}.
+
+@item public domain
+The non-license that is being in the public domain,
+@url{http://www.gnu.org/@/licenses/@/license-list.html#PublicDomain}.
+
+@item Python
+The license for Python, @url{http://www.python.org/@/2.0.1/@/license.html}.
+
+@item RBSD
+The revised (3-clause) BSD, compatible with the GNU GPL,@*
+@url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#5}.
+
+@item X11
+The simple non-copyleft license used for most versions of the X Window
+System, @url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#3}.
+
+@item Zlib
+The license for Zlib, @url{http://www.gzip.org/@/zlib/@/zlib_license.html}.
+
+@end table
+
+More information about these licenses and many more are on the GNU
+licensing web pages,
+@url{http://www.gnu.org/@/licenses/@/license-list.html}.
+
+
+@node --help
+@subsection @option{--help}
+
+@cindex @samp{--help} output
+
+The standard @code{--help} option should output brief documentation
+for how to invoke the program, on standard output, then exit
+successfully.  Other options and arguments should be ignored once this
+is seen, and the program should not perform its normal function.
 
 @cindex address for bug reports
 @cindex bug reports
-Near the end of the @samp{--help} option's output there should be a line
-that says where to mail bug reports.  It should have this format:
+Near the end of the @samp{--help} option's output, please place lines
+giving the email address for bug reports, the package's home page
+(normally @indicateurl{http://www.gnu.org/software/@var{pkg}}, and the
+general page for help using GNU programs.  The format should be like this:
 
 @example
-Report bugs to @var{mailing-address}.
+Report bugs to: @var{mailing-address}
+@var{pkg} home page: <http://www.gnu.org/software/@var{pkg}/>
+General help using GNU software: <http://www.gnu.org/gethelp/>
 @end example
-@end table
+
+It is ok to mention other appropriate mailing lists and web pages.
+
+
+@node Dynamic Plug-In Interfaces
+@section Standards for Dynamic Plug-in Interfaces
+@cindex plug-ins
+@cindex dynamic plug-ins
+
+Another aspect of keeping free programs free is encouraging
+development of free plug-ins, and discouraging development of
+proprietary plug-ins.  Many GNU programs will not have anything like
+plug-ins at all, but those that do should follow these
+practices.
+
+First, the general plug-in architecture design should closely tie the
+plug-in to the original code, such that the plug-in and the base
+program are parts of one extended program.  For GCC, for example,
+plug-ins receive and modify GCC's internal data structures, and so
+clearly form an extended program with the base GCC.
+
+@vindex plugin_is_GPL_compatible
+Second, you should require plug-in developers to affirm that their
+plug-ins are released under an appropriate license.  This should be
+enforced with a simple programmatic check.  For GCC, again for
+example, a plug-in must define the global symbol
+@code{plugin_is_GPL_compatible}, thus asserting that the plug-in is
+released under a GPL-compatible license (@pxref{Plugins,, Plugins,
+gccint, GCC Internals}).
+
+By adding this check to your program you are not creating a new legal
+requirement.  The GPL itself requires plug-ins to be free software,
+licensed compatibly.  As long as you have followed the first rule above
+to keep plug-ins closely tied to your original program, the GPL and AGPL
+already require those plug-ins to be released under a compatible
+license.  The symbol definition in the plug-in---or whatever equivalent
+works best in your program---makes it harder for anyone who might
+distribute proprietary plug-ins to legally defend themselves.  If a case
+about this got to court, we can point to that symbol as evidence that
+the plug-in developer understood that the license had this requirement.
+
 
 @node Option Table
 @section Table of Long Options
@@ -1068,10 +1217,10 @@ and @code{unexpand}.
 @samp{-v} in @code{gawk}.
 
 @item assume-new
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
 
 @item assume-old
-@samp{-o} in Make.
+@samp{-o} in @code{make}.
 
 @item auto-check
 @samp{-a} in @code{recode}.
@@ -1193,7 +1342,7 @@ Used in @code{tar} and @code{cpio}.
 @samp{-d} in @code{touch}.
 
 @item debug
-@samp{-d} in Make and @code{m4};
+@samp{-d} in @code{make} and @code{m4};
 @samp{-t} in Bison.
 
 @item define
@@ -1240,7 +1389,7 @@ specially.
 @samp{-X} in @code{strip}.
 
 @item dry-run
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
 
 @item ed
 @samp{-e} in @code{diff}.
@@ -1258,7 +1407,7 @@ specially.
 @samp{-N} in @code{diff}.
 
 @item environment-overrides
-@samp{-e} in Make.
+@samp{-e} in @code{make}.
 
 @item eof
 @samp{-e} in @code{xargs}.
@@ -1310,9 +1459,8 @@ Used in GDB.
 @samp{-E} in @code{m4}.
 
 @item file
-@samp{-f} in @code{info}, @code{gawk}, Make, @code{mt}, and @code{tar};
-@samp{-n} in @code{sed};
-@samp{-r} in @code{touch}.
+@samp{-f} in @code{gawk}, @code{info}, @code{make}, @code{mt},
+@code{sed}, and @code{tar}.
 
 @item field-separator
 @samp{-F} in @code{gawk}.
@@ -1424,7 +1572,7 @@ In @code{makeinfo}, output HTML.
 @samp{-i} in @code{diff} and @code{wdiff}.
 
 @item ignore-errors
-@samp{-i} in Make.
+@samp{-i} in @code{make}.
 
 @item ignore-file
 @samp{-i} in @code{ptx}.
@@ -1452,7 +1600,7 @@ In @code{makeinfo}, output HTML.
 @samp{-I} in @code{m4}.
 
 @item include-dir
-@samp{-I} in Make.
+@samp{-I} in @code{make}.
 
 @item incremental
 @samp{-G} in @code{tar}.
@@ -1486,13 +1634,13 @@ init file.
 Used in @code{date}
 
 @item jobs
-@samp{-j} in Make.
+@samp{-j} in @code{make}.
 
 @item just-print
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
 
 @item keep-going
-@samp{-k} in Make.
+@samp{-k} in @code{make}.
 
 @item keep-files
 @samp{-k} in @code{csplit}.
@@ -1533,7 +1681,7 @@ Used in @code{gawk}.
 @samp{-N} in @code{ls}.
 
 @item load-average
-@samp{-l} in Make.
+@samp{-l} in @code{make}.
 
 @item login
 Used in @code{su}.
@@ -1551,7 +1699,7 @@ Used in @code{uname}.
 @samp{-d} in @code{cpio}.
 
 @item makefile
-@samp{-f} in Make.
+@samp{-f} in @code{make}.
 
 @item mapped
 Used in GDB.
@@ -1566,7 +1714,7 @@ Used in GDB.
 @samp{-l} in @code{xargs}.
 
 @item max-load
-@samp{-l} in Make.
+@samp{-l} in @code{make}.
 
 @item max-procs
 @samp{-P} in @code{xargs}.
@@ -1602,10 +1750,10 @@ Used in GDB.
 @samp{-a} in @code{shar}.
 
 @item new-file
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
 
 @item no-builtin-rules
-@samp{-r} in Make.
+@samp{-r} in @code{make}.
 
 @item no-character-count
 @samp{-w} in @code{shar}.
@@ -1632,7 +1780,7 @@ Used in GDB.
 @samp{-2} in @code{wdiff}.
 
 @item no-keep-going
-@samp{-S} in Make.
+@samp{-S} in @code{make}.
 
 @item no-lines
 @samp{-l} in Bison.
@@ -1707,7 +1855,7 @@ Used in GDB.
 @samp{-o} in @code{tar}.
 
 @item old-file
-@samp{-o} in Make.
+@samp{-o} in @code{make}.
 
 @item one-file-system
 @samp{-l} in @code{tar}, @code{cp}, and @code{du}.
@@ -1792,10 +1940,10 @@ Used in @code{tar} and @code{cp}.
 @samp{-L} in @code{cmp}.
 
 @item print-data-base
-@samp{-p} in Make.
+@samp{-p} in @code{make}.
 
 @item print-directory
-@samp{-w} in Make.
+@samp{-w} in @code{make}.
 
 @item print-file-name
 @samp{-o} in @code{nm}.
@@ -1816,7 +1964,7 @@ Specify an HTTP proxy.
 @samp{-X} in @code{shar}.
 
 @item question
-@samp{-q} in Make.
+@samp{-q} in @code{make}.
 
 @item quiet
 Used in many programs to inhibit the usual output.  Every
@@ -1842,7 +1990,7 @@ Used in @code{gawk}.
 Used in GDB.
 
 @item recon
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
 
 @item record-number
 @samp{-R} in @code{tar}.
@@ -1851,8 +1999,8 @@ Used in GDB.
 Used in @code{chgrp}, @code{chown}, @code{cp}, @code{ls}, @code{diff},
 and @code{rm}.
 
-@item reference-limit
-Used in @code{makeinfo}.
+@item reference
+@samp{-r} in @code{touch}.
 
 @item references
 @samp{-r} in @code{ptx}.
@@ -1943,7 +2091,7 @@ Every program accepting
 @item socket
 Specify a file descriptor for a network server to use for its socket,
 instead of opening and binding a new socket.  This provides a way to
-run, in a nonpriveledged process, a server that normally needs a
+run, in a non-privileged process, a server that normally needs a
 reserved port number.
 
 @item sort
@@ -1984,7 +2132,7 @@ a directory to start processing with.
 @samp{-S} in @code{shar}.
 
 @item stop
-@samp{-S} in Make.
+@samp{-S} in @code{make}.
 
 @item strict
 @samp{-s} in @code{recode}.
@@ -2054,7 +2202,7 @@ Specify how long to wait before giving up on some operation.
 @samp{-c} in @code{du}.
 
 @item touch
-@samp{-t} in Make, @code{ranlib}, and @code{recode}.
+@samp{-t} in @code{make}, @code{ranlib}, and @code{recode}.
 
 @item trace
 @samp{-t} in @code{m4}.
@@ -2119,7 +2267,7 @@ Print the version number.
 @samp{-V} in @code{tar}.
 
 @item what-if
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
 
 @item whole-size-limit
 @samp{-l} in @code{shar}.
@@ -2137,6 +2285,28 @@ Print the version number.
 @samp{-z} in @code{gprof}.
 @end table
 
+@node OID Allocations
+@section OID Allocations
+@cindex OID allocations for GNU
+@cindex SNMP
+@cindex LDAP
+@cindex X.509
+
+The OID (object identifier) 1.3.6.1.4.1.11591 has been assigned to the
+GNU Project (thanks to Werner Koch).  These are used for SNMP, LDAP,
+X.509 certificates, and so on.  The web site
+@url{http://www.alvestrand.no/objectid} has a (voluntary) listing of
+many OID assignments.
+
+If you need a new slot for your GNU package, write
+@email{maintainers@@gnu.org}.  Here is a list of arcs currently
+assigned:
+
+@example
+@include gnu-oids.texi
+@end example
+
+
 @node Memory Usage
 @section Memory Usage
 @cindex memory usage
@@ -2144,7 +2314,7 @@ Print the version number.
 If a program typically uses just a few meg of memory, don't bother making any
 effort to reduce memory usage.  For example, if it is impractical for
 other reasons to operate on files more than a few meg long, it is
-reasonable to read entire input files into core to operate on them.
+reasonable to read entire input files into memory to operate on them.
 
 However, for programs such as @code{cat} or @code{tail}, that can
 usefully operate on very large files, it is important to avoid using a
@@ -2152,10 +2322,17 @@ technique that would artificially limit the size of files it can handle.
 If a program works by lines and could be applied to arbitrary
 user-supplied input files, it should keep only a line in memory, because
 this is not very hard and users will want to be able to operate on input
-files that are bigger than will fit in core all at once.
+files that are bigger than will fit in memory all at once.
 
 If your program creates complicated data structures, just make them in
-core and give a fatal error if @code{malloc} returns zero.
+memory and give a fatal error if @code{malloc} returns zero.
+
+@pindex valgrind
+@cindex memory leak
+Memory leak detectors such as @command{valgrind} can be useful, but
+don't complicate a program merely to avoid their false alarms.  For
+example, if memory is used until just before a process exits, don't
+free it simply to silence a leak detector.
 
 @node File Usage
 @section File Usage
@@ -2181,14 +2358,14 @@ This chapter provides advice on how best to use the C language
 when writing GNU software.
 
 @menu
-* Formatting::                  Formatting Your Source Code
-* Comments::                    Commenting Your Work
-* Syntactic Conventions::       Clean Use of C Constructs
-* Names::                       Naming Variables, Functions, and Files
-* System Portability::          Portability between different operating systems
-* CPU Portability::             Supporting the range of CPU types
-* System Functions::            Portability and ``standard'' library functions
-* Internationalization::        Techniques for internationalization
+* Formatting::                  Formatting your source code.
+* Comments::                    Commenting your work.
+* Syntactic Conventions::       Clean use of C constructs.
+* Names::                       Naming variables, functions, and files.
+* System Portability::          Portability among different operating systems.
+* CPU Portability::             Supporting the range of CPU types.
+* System Functions::            Portability and ``standard'' library functions.
+* Internationalization::        Techniques for internationalization.
 * Character Set::               Use ASCII by default.
 * Quote Characters::            Use `...' in the C locale.
 * Mmap::                        How you can safely use @code{mmap}.
@@ -2201,10 +2378,14 @@ when writing GNU software.
 @cindex open brace
 @cindex braces, in C source
 It is important to put the open-brace that starts the body of a C
-function in column one, and avoid putting any other open-brace or
-open-parenthesis or open-bracket in column one.  Several tools look
-for open-braces in column one to find the beginnings of C functions.
-These tools will not work on code not formatted that way.
+function in column one, so that they will start a defun.  Several
+tools look for open-braces in column one to find the beginnings of C
+functions.  These tools will not work on code not formatted that way.
+
+Avoid putting open-brace, open-parenthesis or open-bracket in column
+one when they are inside a function, so that they won't start a defun.
+The open-brace that starts a @code{struct} body can go in column one
+if you find it useful to treat that definition as a defun.
 
 It is also important for function definitions to start the name of the
 function in column one.  This helps people to search for function
@@ -2461,6 +2642,17 @@ warnings for valid and legitimate code which they do not want to change.
 If you want to do this, then do.  The compiler should be your servant,
 not your master.
 
+@pindex clang
+@pindex lint
+Don't make the program ugly just to placate static analysis tools such
+as @command{lint}, @command{clang}, and GCC with extra warnings
+options such as @option{-Wconversion} and @option{-Wundef}.  These
+tools can help find bugs and unclear code, but they can also generate
+so many false alarms that that it hurts readability to silence them
+with unnecessary casts, wrappers, and other complications.  For
+example, please don't insert casts to @code{void} or calls to
+do-nothing functions merely to pacify a lint checker.
+
 Declarations of external functions and functions to appear later in the
 source file should all go in one place near the beginning of the file
 (somewhere before the first function definition in the file), or else
@@ -2478,6 +2670,7 @@ declaration of each local variable into the smallest scope that includes
 all its uses.  This makes the program even cleaner.
 
 Don't use local variables or parameters that shadow global identifiers.
+GCC's @samp{-Wshadow} option can detect this problem.
 
 @cindex multiple variables in a line
 Don't declare multiple variables in one declaration that spans lines.
@@ -2563,8 +2756,9 @@ Don't declare both a structure tag and variables or typedefs in the
 same declaration.  Instead, declare the structure tag separately
 and then use it to declare the variables or typedefs.
 
-Try to avoid assignments inside @code{if}-conditions.  For example,
-don't write this:
+Try to avoid assignments inside @code{if}-conditions (assignments
+inside @code{while}-conditions are ok).  For example, don't write
+this:
 
 @example
 if ((foo = (char *) malloc (sizeof *foo)) == 0)
@@ -2580,10 +2774,9 @@ if (foo == 0)
   fatal ("virtual memory exhausted");
 @end example
 
-@pindex lint
-Don't make the program ugly to placate @code{lint}.  Please don't insert any
-casts to @code{void}.  Zero without a cast is perfectly fine as a null
-pointer constant, except when calling a varargs function.
+This example uses zero without a cast as a null pointer constant.
+This is perfectly fine, except that a cast is needed when calling a
+varargs function or when using @code{sizeof}.
 
 @node Names
 @section Naming Variables, Functions, and Files
@@ -2639,6 +2832,7 @@ GNU programs that have it, but there is no need to do this in new GNU
 programs.  @code{doschk} also reports file names longer than 14
 characters.
 
+
 @node System Portability
 @section Portability between System Types
 @cindex portability, between system types
@@ -2681,7 +2875,7 @@ If you do support Windows, please do not abbreviate it as ``win''.  In
 hacker terminology, calling something a ``win'' is a form of praise.
 You're free to praise Microsoft Windows on your own if you want, but
 please don't do this in GNU packages.  Instead of abbreviating
-``Windows'' to ``un'', you can write it in full or abbreviate it to
+``Windows'' to ``win'', you can write it in full or abbreviate it to
 ``woe'' or ``w''.  In GNU Emacs, for instance, we use @samp{w32} in
 file names of Windows-specific files, but the macro for Windows
 conditionals is called @code{WINDOWSNT}.
@@ -2720,9 +2914,9 @@ printf ("diff = %ld\n", (long) (pointer2 - pointer1));
 @end example
 
 1989 Standard C requires this to work, and we know of only one
-counterexample: 64-bit programs on Microsoft Windows.  We will
-leave it to those who want to port GNU programs to that environment
-to figure out how to do it.
+counterexample: 64-bit programs on Microsoft Windows.  We will leave
+it to those who want to port GNU programs to that environment to
+figure out how to do it.
 
 Predefined file-size types like @code{off_t} are an exception: they are
 longer than @code{long} on many platforms, so code like the above won't
@@ -2736,53 +2930,21 @@ machines.  Thus, don't make the following mistake:
 @example
 int c;
 @dots{}
-while ((c = getchar()) != EOF)
-  write(file_descriptor, &c, 1);
+while ((c = getchar ()) != EOF)
+  write (file_descriptor, &c, 1);
 @end example
 
-It used to be ok to not worry about the difference between pointers
-and integers when passing arguments to functions.  However, on most
-modern 64-bit machines pointers are wider than @code{int}.
-Conversely, integer types like @code{long long int} and @code{off_t}
-are wider than pointers on most modern 32-bit machines.  Hence it's
-often better nowadays to use prototypes to define functions whose
-argument types are not trivial.
-
-In particular, if functions accept varying argument counts or types
-they should be declared using prototypes containing @samp{...} and
-defined using @file{stdarg.h}.  For an example of this, please see the
-@uref{http://www.gnu.org/software/gnulib/, Gnulib} error module, which
-declares and defines the following function:
+@noindent Instead, use @code{unsigned char} as follows.  (The @code{unsigned}
+is for portability to unusual systems where @code{char} is signed and
+where there is integer overflow checking.)
 
 @example
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
-   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
-
-void error (int status, int errnum, const char *format, ...);
-@end example
-
-A simple way to use the Gnulib error module is to obtain the two
-source files @file{error.c} and @file{error.h} from the Gnulib library
-source code repository at
-@uref{http://savannah.gnu.org/cgi-bin/viewcvs/gnulib/gnulib/lib/}.
-Here's a sample use:
-
-@example
-#include "error.h"
-#include <errno.h>
-#include <stdio.h>
-
-char *program_name = "myprogram";
-
-FILE *
-xfopen (char const *name)
-@{
-  FILE *fp = fopen (name, "r");
-  if (! fp)
-    error (1, errno, "cannot read %s", name);
-  return fp;
-@}
+int c;
+while ((c = getchar ()) != EOF)
+  @{
+    unsigned char u = c;
+    write (file_descriptor, &u, 1);
+  @}
 @end example
 
 @cindex casting pointers to integers
@@ -2795,133 +2957,75 @@ sizes.  You will also need to make provision for systems in which the
 normal range of addresses you can get from @code{malloc} starts far away
 from zero.
 
+
 @node System Functions
 @section Calling System Functions
+
+@cindex C library functions, and portability
+@cindex POSIX functions, and portability
 @cindex library functions, and portability
 @cindex portability, and library functions
 
-C implementations differ substantially.  Standard C reduces but does
-not eliminate the incompatibilities; meanwhile, many GNU packages still
-support pre-standard compilers because this is not hard to do.  This
-chapter gives recommendations for how to use the more-or-less standard C
-library functions to avoid unnecessary loss of portability.
-
-@itemize @bullet
-@item
-Don't use the return value of @code{sprintf}.  It returns the number of
-characters written on some systems, but not on all systems.
-
-@item
-Be aware that @code{vfprintf} is not always available.
-
-@item
-@code{main} should be declared to return type @code{int}.  It should
-terminate either by calling @code{exit} or by returning the integer
-status code; make sure it cannot ever return an undefined value.
-
-@cindex declaration for system functions
-@item
-Don't declare system functions explicitly.
-
-Almost any declaration for a system function is wrong on some system.
-To minimize conflicts, leave it to the system header files to declare
-system functions.  If the headers don't declare a function, let it
-remain undeclared.
-
-While it may seem unclean to use a function without declaring it, in
-practice this works fine for most system library functions on the
-systems where this really happens; thus, the disadvantage is only
-theoretical.  By contrast, actual declarations have frequently caused
-actual conflicts.
-
-@item
-If you must declare a system function, don't specify the argument types.
-Use an old-style declaration, not a Standard C prototype.  The more you
-specify about the function, the more likely a conflict.
-
-@item
-In particular, don't unconditionally declare @code{malloc} or
-@code{realloc}.
-
-Most GNU programs use those functions just once, in functions
-conventionally named @code{xmalloc} and @code{xrealloc}.  These
-functions call @code{malloc} and @code{realloc}, respectively, and
-check the results.
-
-Because @code{xmalloc} and @code{xrealloc} are defined in your program,
-you can declare them in other files without any risk of type conflict.
-
-On most systems, @code{int} is the same length as a pointer; thus, the
-calls to @code{malloc} and @code{realloc} work fine.  For the few
-exceptional systems (mostly 64-bit machines), you can use
-@strong{conditionalized} declarations of @code{malloc} and
-@code{realloc}---or put these declarations in configuration files
-specific to those systems.
+Historically, C implementations differed substantially, and many
+systems lacked a full implementation of ANSI/ISO C89.  Nowadays,
+however, very few systems lack a C89 compiler and GNU C supports
+almost all of C99.  Similarly, most systems implement POSIX.1-1993
+libraries and tools, and many have POSIX.1-2001.
 
-@cindex string library functions
-@item
-The string functions require special treatment.  Some Unix systems have
-a header file @file{string.h}; others have @file{strings.h}.  Neither
-file name is portable.  There are two things you can do: use Autoconf to
-figure out which file to include, or don't include either file.
-
-@item
-If you don't include either strings file, you can't get declarations for
-the string functions from the header file in the usual way.
-
-That causes less of a problem than you might think.  The newer standard
-string functions should be avoided anyway because many systems still
-don't support them.  The string functions you can use are these:
-
-@example
-strcpy   strncpy   strcat   strncat
-strlen   strcmp    strncmp
-strchr   strrchr
-@end example
+Hence, there is little reason to support old C or non-POSIX systems,
+and you may want to take advantage of C99 and POSIX-1.2001 to write
+clearer, more portable, or faster code.  You should use standard
+interfaces where possible; but if GNU extensions make your program
+more maintainable, powerful, or otherwise better, don't hesitate to
+use them.  In any case, don't make your own declaration of system
+functions; that's a recipe for conflict.
 
-The copy and concatenate functions work fine without a declaration as
-long as you don't use their values.  Using their values without a
-declaration fails on systems where the width of a pointer differs from
-the width of @code{int}, and perhaps in other cases.  It is trivial to
-avoid using their values, so do that.
+Despite the standards, nearly every library function has some sort of
+portability issue on some system or another.  Here are some examples:
 
-The compare functions and @code{strlen} work fine without a declaration
-on most systems, possibly all the ones that GNU software runs on.
-You may find it necessary to declare them @strong{conditionally} on a
-few systems.
+@table @code
+@item open
+Names with trailing @code{/}'s are mishandled on many platforms.
 
-The search functions must be declared to return @code{char *}.  Luckily,
-there is no variation in the data type they return.  But there is
-variation in their names.  Some systems give these functions the names
-@code{index} and @code{rindex}; other systems use the names
-@code{strchr} and @code{strrchr}.  Some systems support both pairs of
-names, but neither pair works on all systems.
+@item printf
+@code{long double} may be unimplemented; floating values Infinity and
+NaN are often mishandled; output for large precisions may be
+incorrect.
 
-You should pick a single pair of names and use it throughout your
-program.  (Nowadays, it is better to choose @code{strchr} and
-@code{strrchr} for new programs, since those are the standard
-names.)  Declare both of those names as functions returning @code{char
-*}.  On systems which don't support those names, define them as macros
-in terms of the other pair.  For example, here is what to put at the
-beginning of your file (or in a header) if you want to use the names
-@code{strchr} and @code{strrchr} throughout:
+@item readlink
+May return @code{int} instead of @code{ssize_t}.
 
-@example
-#ifndef HAVE_STRCHR
-#define strchr index
-#endif
-#ifndef HAVE_STRRCHR
-#define strrchr rindex
-#endif
+@item scanf
+On Windows, @code{errno} is not set on failure.
+@end table
 
-char *strchr ();
-char *strrchr ();
-@end example
-@end itemize
+@cindex Gnulib
+@uref{http://www.gnu.org/software/gnulib/, Gnulib} is a big help in
+this regard.  Gnulib provides implementations of standard interfaces
+on many of the systems that lack them, including portable
+implementations of enhanced GNU interfaces, thereby making their use
+portable, and of POSIX-1.2008 interfaces, some of which are missing
+even on up-to-date GNU systems.
+
+@findex xmalloc, in Gnulib
+@findex error messages, in Gnulib
+@findex data structures, in Gnulib
+Gnulib also provides many useful non-standard interfaces; for example,
+C implementations of standard data structures (hash tables, binary
+trees), error-checking type-safe wrappers for memory allocation
+functions (@code{xmalloc}, @code{xrealloc}), and output of error
+messages.
+
+Gnulib integrates with GNU Autoconf and Automake to remove much of the
+burden of writing portable code from the programmer: Gnulib makes your
+configure script automatically determine what features are missing and
+use the Gnulib code to supply the missing pieces.
+
+The Gnulib and Autoconf manuals have extensive sections on
+portability: @ref{Top,, Introduction, gnulib, Gnulib} and
+@pxref{Portable C and C++,,, autoconf, Autoconf}.  Please consult them
+for many more details.
 
-Here we assume that @code{HAVE_STRCHR} and @code{HAVE_STRRCHR} are
-macros defined in systems where the corresponding functions exist.
-One way to get them properly defined is to use Autoconf.
 
 @node Internationalization
 @section Internationalization
@@ -2952,7 +3056,7 @@ Using GNU gettext in a package involves specifying a @dfn{text domain
 name} for the package.  The text domain name is used to separate the
 translations for this package from the translations for other packages.
 Normally, the text domain name should be the same as the name of the
-package---for example, @samp{fileutils} for the GNU file utilities.
+package---for example, @samp{coreutils} for the GNU core utilities.
 
 @cindex message text, and internationalization
 To enable gettext to work well, avoid writing code that makes
@@ -2964,45 +3068,31 @@ sentence framework.
 
 Here is an example of what not to do:
 
-@example
-printf ("%d file%s processed", nfiles,
-        nfiles != 1 ? "s" : "");
-@end example
+@smallexample
+printf ("%s is full", capacity > 5000000 ? "disk" : "floppy disk");
+@end smallexample
 
-@noindent
-The problem with that example is that it assumes that plurals are made
-by adding `s'.  If you apply gettext to the format string, like this,
+If you apply gettext to all strings, like this,
 
-@example
-printf (gettext ("%d file%s processed"), nfiles,
-        nfiles != 1 ? "s" : "");
-@end example
+@smallexample
+printf (gettext ("%s is full"),
+        capacity > 5000000 ? gettext ("disk") : gettext ("floppy disk"));
+@end smallexample
 
 @noindent
-the message can use different words, but it will still be forced to use
-`s' for the plural.  Here is a better way:
-
-@example
-printf ((nfiles != 1 ? "%d files processed"
-         : "%d file processed"),
-        nfiles);
-@end example
+the translator will hardly know that "disk" and "floppy disk" are meant to
+be substituted in the other string.  Worse, in some languages (like French)
+the construction will not work: the translation of the word "full" depends
+on the gender of the first part of the sentence; it happens to be not the
+same for "disk" as for "floppy disk".
 
-@noindent
-This way, you can apply gettext to each of the two strings
-independently:
+Complete sentences can be translated without problems:
 
 @example
-printf ((nfiles != 1 ? gettext ("%d files processed")
-         : gettext ("%d file processed")),
-        nfiles);
+printf (capacity > 5000000 ? gettext ("disk is full")
+        : gettext ("floppy disk is full"));
 @end example
 
-@noindent
-This can be any method of forming the plural of the word for ``file'', and
-also handles languages that require agreement in the word for
-``processed''.
-
 A similar problem appears at the level of sentence structure with this
 code:
 
@@ -3015,7 +3105,7 @@ printf ("#  Implicit rule search has%s been done.\n",
 Adding @code{gettext} calls to this code cannot give correct results for
 all languages, because negation in some languages requires adding words
 at more than one place in the sentence.  By contrast, adding
-@code{gettext} calls does the job straightfowardly if the code starts
+@code{gettext} calls does the job straightforwardly if the code starts
 out like this:
 
 @example
@@ -3024,6 +3114,43 @@ printf (f->tried_implicit
         : "#  Implicit rule search has not been done.\n");
 @end example
 
+Another example is this one:
+
+@example
+printf ("%d file%s processed", nfiles,
+        nfiles != 1 ? "s" : "");
+@end example
+
+@noindent
+The problem with this example is that it assumes that plurals are made
+by adding `s'.  If you apply gettext to the format string, like this,
+
+@example
+printf (gettext ("%d file%s processed"), nfiles,
+        nfiles != 1 ? "s" : "");
+@end example
+
+@noindent
+the message can use different words, but it will still be forced to use
+`s' for the plural.  Here is a better way, with gettext being applied to
+the two strings independently:
+
+@example
+printf ((nfiles != 1 ? gettext ("%d files processed")
+         : gettext ("%d file processed")),
+        nfiles);
+@end example
+
+@noindent
+But this still doesn't work for languages like Polish, which has three
+plural forms: one for nfiles == 1, one for nfiles == 2, 3, 4, 22, 23, 24, ...
+and one for the rest.  The GNU @code{ngettext} function solves this problem:
+
+@example
+printf (ngettext ("%d files processed", "%d file processed", nfiles),
+        nfiles);
+@end example
+
 
 @node Character Set
 @section Character Set
@@ -3115,7 +3242,7 @@ extending it, as well as just using it.
 * Manual Credits::              Giving credit to documentation contributors.
 * Printed Manuals::             Mentioning the printed manual.
 * NEWS File::                   NEWS files supplement manuals.
-* Change Logs::                 Recording Changes
+* Change Logs::                 Recording changes.
 * Man Pages::                   Man pages are secondary.
 * Reading other Manuals::       How far you can go in learning
                                 from other manuals.
@@ -3251,7 +3378,7 @@ should often make some general points that apply to several functions or
 variables.  The previous descriptions of functions and variables in the
 section will also have given information about the topic.  A description
 written to stand alone would repeat some of that information; this
-redundance looks bad.  Meanwhile, the informality that is acceptable in
+redundancy looks bad.  Meanwhile, the informality that is acceptable in
 a documentation string is totally unacceptable in a manual.
 
 The only good way to use documentation strings in writing a good manual
@@ -3373,7 +3500,7 @@ clear explanation of how the earlier version differed.
 
 The change log file is normally called @file{ChangeLog} and covers an
 entire directory.  Each directory can have its own change log, or a
-directory can use the change log of its parent directory--it's up to
+directory can use the change log of its parent directory---it's up to
 you.
 
 Another alternative is to record change log information with a version
@@ -3381,22 +3508,21 @@ control system such as RCS or CVS.  This can be converted automatically
 to a @file{ChangeLog} file using @code{rcs2log}; in Emacs, the command
 @kbd{C-x v a} (@code{vc-update-change-log}) does the job.
 
-There's no need to describe the full purpose of the changes or how they
-work together.  If you think that a change calls for explanation, you're
-probably right.  Please do explain it---but please put the explanation
-in comments in the code, where people will see it whenever they see the
-code.  For example, ``New function'' is enough for the change log when
-you add a function, because there should be a comment before the
-function definition to explain what it does.
+There's no need to describe the full purpose of the changes or how
+they work together.  However, sometimes it is useful to write one line
+to describe the overall purpose of a change or a batch of changes.  If
+you think that a change calls for explanation, you're probably right.
+Please do explain it---but please put the full explanation in comments
+in the code, where people will see it whenever they see the code.  For
+example, ``New function'' is enough for the change log when you add a
+function, because there should be a comment before the function
+definition to explain what it does.
 
 In the past, we recommended not mentioning changes in non-software
 files (manuals, help files, etc.) in change logs.  However, we've been
 advised that it is a good idea to include them, for the sake of
 copyright records.
 
-However, sometimes it is useful to write one line to describe the
-overall purpose of a batch of changes.
-
 The easiest way to add an entry to @file{ChangeLog} is with the Emacs
 command @kbd{M-x add-change-log-entry}.  An entry should have an
 asterisk, the name of the changed file, and then in parentheses the name
@@ -3597,15 +3723,10 @@ page explaining that you don't maintain it and that the Texinfo manual
 is more authoritative.  The note should say how to access the Texinfo
 documentation.
 
-Be sure that man pages include a copyright statement and free
-license.  The simple all-permissive license is appropriate for simple
-man pages:
-
-@example
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-@end example
+Be sure that man pages include a copyright statement and free license.
+The simple all-permissive license is appropriate for simple man pages
+(@pxref{License Notices for Other Files,,,maintain,Information for GNU
+Maintainers}).
 
 For long man pages, with enough explanation and documentation that
 they can be considered true manuals, use the GFDL (@pxref{License for
@@ -3644,9 +3765,9 @@ makes it easy to include your package into the larger framework of
 all GNU software.
 
 @menu
-* Configuration::               How Configuration Should Work
-* Makefile Conventions::        Makefile Conventions
-* Releases::                    Making Releases
+* Configuration::               How configuration of GNU packages should work.
+* Makefile Conventions::        Makefile conventions.
+* Releases::                    Making releases
 @end menu
 
 @node Configuration
@@ -3657,15 +3778,23 @@ all GNU software.
 Each GNU distribution should come with a shell script named
 @code{configure}.  This script is given arguments which describe the
 kind of machine and system you want to compile the program for.
-
 The @code{configure} script must record the configuration options so
 that they affect compilation.
 
-One way to do this is to make a link from a standard name such as
-@file{config.h} to the proper configuration file for the chosen system.
-If you use this technique, the distribution should @emph{not} contain a
-file named @file{config.h}.  This is so that people won't be able to
-build the program without configuring it first.
+The description here is the specification of the interface for the
+@code{configure} script in GNU packages.  Many packages implement it
+using GNU Autoconf (@pxref{Top,, Introduction, autoconf, Autoconf})
+and/or GNU Automake (@pxref{Top,, Introduction, automake, Automake}),
+but you do not have to use these tools.  You can implement it any way
+you like; for instance, by making @code{configure} be a wrapper around
+a completely different configuration system.
+
+Another way for the @code{configure} script to operate is to make a
+link from a standard name such as @file{config.h} to the proper
+configuration file for the chosen system.  If you use this technique,
+the distribution should @emph{not} contain a file named
+@file{config.h}.  This is so that people won't be able to build the
+program without configuring it first.
 
 Another thing that @code{configure} can do is to edit the Makefile.  If
 you do this, the distribution should @emph{not} contain a file named
@@ -3707,6 +3836,17 @@ refer explicitly to the specified source directory.  To make this
 possible, @code{configure} can add to the Makefile a variable named
 @code{srcdir} whose value is precisely the specified directory.
 
+In addition, the @samp{configure} script should take options
+corresponding to most of the standard directory variables
+(@pxref{Directory Variables}).  Here is the list:
+
+@example
+--prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir
+--sharedstatedir --localstatedir --libdir --includedir --oldincludedir
+--datarootdir --datadir --infodir --localedir --mandir --docdir
+--htmldir --dvidir --pdfdir --psdir
+@end example
+
 The @code{configure} script should also take an argument which specifies the
 type of system to build the program for.  This argument should look like
 this:
@@ -3722,7 +3862,7 @@ The @code{configure} script needs to be able to decode all plausible
 alternatives for how to describe a machine.  Thus,
 @samp{athlon-pc-gnu/linux} would be a valid alias.  There is a shell
 script called
-@uref{http://savannah.gnu.org/@/cgi-bin/@/viewcvs/@/*checkout*/@/config/@/config/@/config.sub,
+@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD,
 @file{config.sub}} that you can use as a subroutine to validate system
 types and canonicalize aliases.
 
@@ -3733,13 +3873,13 @@ plain @var{buildtype} argument.  For example, @samp{configure
 i686-pc-linux-gnu}.  When the build type is not specified by an option
 or argument, the @code{configure} script should normally guess it using
 the shell script
-@uref{http://savannah.gnu.org/@/cgi-bin/@/viewcvs/@/*checkout*/@/config/@/config/@/config.guess,
+@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD,
 @file{config.guess}}.
 
 @cindex optional features, configure-time
 Other options are permitted to specify in more detail the software
-or hardware present on the machine, and include or exclude optional
-parts of the package:
+or hardware present on the machine, to include or exclude optional parts
+of the package, or to adjust the name of some tools or arguments to them:
 
 @table @samp
 @item --enable-@var{feature}@r{[}=@var{parameter}@r{]}
@@ -3772,14 +3912,32 @@ and
 Do not use a @samp{--with} option to specify the file name to use to
 find certain files.  That is outside the scope of what @samp{--with}
 options are for.
+
+@item @var{variable}=@var{value}
+Set the value of the variable @var{variable} to @var{value}.  This is
+used to override the default values of commands or arguments in the
+build process.  For example, the user could issue @samp{configure
+CFLAGS=-g CXXFLAGS=-g} to build with debugging information and without
+the default optimization.
+
+Specifying variables as arguments to @code{configure}, like this:
+@example
+./configure CC=gcc
+@end example
+is preferable to setting them in environment variables:
+@example
+CC=gcc ./configure
+@end example
+as it helps to recreate the same configuration later with
+@file{config.status}.  However, both methods should be supported.
 @end table
 
-All @code{configure} scripts should accept all of these ``detail''
-options, whether or not they make any difference to the particular
-package at hand.  In particular, they should accept any option that
-starts with @samp{--with-} or @samp{--enable-}.  This is so users will
-be able to configure an entire GNU source tree at once with a single set
-of options.
+All @code{configure} scripts should accept all of the ``detail''
+options and the variable settings, whether or not they make any
+difference to the particular package at hand.  In particular, they
+should accept any option that starts with @samp{--with-} or
+@samp{--enable-}.  This is so users will be able to configure an
+entire GNU source tree at once with a single set of options.
 
 You will note that the categories @samp{--with-} and @samp{--enable-}
 are narrow: they @strong{do not} provide a place for any sort of option
@@ -3859,7 +4017,7 @@ should contain an explanation of the installation procedure.
 The @file{README} file should also refer to the file which contains the
 copying conditions.  The GNU GPL, if used, should be in a file called
 @file{COPYING}.  If the GNU LGPL is used, it should be in a file called
-@file{COPYING.LIB}.
+@file{COPYING.LESSER}.
 
 Naturally, all the source files must be in the distribution.  It is okay
 to include non-source files in the distribution, provided they are
@@ -3874,13 +4032,13 @@ installing the program should @strong{never} be included in the
 distribution.  So if you do distribute non-source files, always make
 sure they are up to date when you make a new distribution.
 
-Make sure that the directory into which the distribution unpacks (as
-well as any subdirectories) are all world-writable (octal mode 777).
-This is so that old versions of @code{tar} which preserve the
-ownership and permissions of the files from the tar archive will be
-able to extract all the files even if the user is unprivileged.
-
-Make sure that all the files in the distribution are world-readable.
+Make sure that all the files in the distribution are world-readable, and
+that directories are world-readable and world-searchable (octal mode 755).
+We used to recommend that all directories in the distribution also be
+world-writable (octal mode 777), because ancient versions of @code{tar}
+would otherwise not cope when extracting the archive as an unprivileged
+user.  That can easily lead to security issues when creating the archive,
+however, so now we recommend against that.
 
 Don't include any symbolic links in the distribution itself.  If the tar
 file contains symbolic links, then people cannot even unpack it on
@@ -3911,24 +4069,25 @@ other files to get.
 @chapter References to Non-Free Software and Documentation
 @cindex references to non-free material
 
-A GNU program should not recommend use of any non-free program.  We
+A GNU program should not recommend, promote, or grant legitimacy to
+the use of any non-free program.  Proprietary software is a social and
+ethical problem, and our aim is to put an end to that problem.  We
 can't stop some people from writing proprietary programs, or stop
 other people from using them, but we can and should refuse to
-advertise them to new potential customers.  Proprietary software is a
-social and ethical problem, and the point of GNU is to solve that
-problem.
+advertise them to new potential customers, or to give the public the
+idea that their existence is ethical.
 
 The GNU definition of free software is found on the GNU web site at
-@url{http://www.gnu.org/philosophy/free-sw.html}, and the definition
+@url{http://www.gnu.org/@/philosophy/@/free-sw.html}, and the definition
 of free documentation is found at
-@url{http://www.gnu.org/philosophy/free-doc.html}.  A list of
-important licenses and whether they qualify as free is in
-@url{http://www.gnu.org/@/licenses/@/license-list.html}.  The terms
-``free'' and ``non-free'', used in this document, refer to that
-definition.  If it is not clear whether a license qualifies as free
-under this definition, please ask the GNU Project by writing to
-@email{licensing@@gnu.org}.  We will answer, and if the license is an
-important one, we will add it to the list.
+@url{http://www.gnu.org/@/philosophy/@/free-doc.html}.  The terms ``free''
+and ``non-free'', used in this document, refer to those definitions.
+
+A list of important licenses and whether they qualify as free is in
+@url{http://www.gnu.org/@/licenses/@/license-list.html}.  If it is not
+clear whether a license qualifies as free, please ask the GNU Project
+by writing to @email{licensing@@gnu.org}.  We will answer, and if the
+license is an important one, we will add it to the list.
 
 When a non-free program or system is well known, you can mention it in
 passing---that is harmless, since users who might want to use it
@@ -3945,62 +4104,80 @@ enhances your program, or that its existence is in any way a good
 thing.  The goal should be that people already using the proprietary
 program will get the advice they need about how to use your free
 program with it, while people who don't already use the proprietary
-program will not see anything to lead them to take an interest in it.
+program will not see anything likely to lead them to take an interest
+in it.
 
 If a non-free program or system is obscure in your program's domain,
 your program should not mention or support it at all, since doing so
 would tend to popularize the non-free program more than it popularizes
-your program.  (You cannot hope to find many additional users among
-the users of Foobar if the users of Foobar are few.)
+your program.  (You cannot hope to find many additional users for your
+program among the users of Foobar, if the existence of Foobar is not
+generally known among people who might want to use your program.)
 
 Sometimes a program is free software in itself but depends on a
 non-free platform in order to run.  For instance, many Java programs
-depend on Sun's Java implementation, and won't run on the GNU Java
-Compiler (which does not yet have all the features) or won't run with
-the GNU Java libraries.  To recommend that program is inherently to
-recommend the non-free platform as well; if you should not do the
-latter, then don't do the former.
+depend on some non-free Java libraries.  To recommend or promote such
+a program is to promote the other programs it needs.  This is why we
+are careful about listing Java programs in the Free Software
+Directory: we don't want to promote the non-free Java libraries.
+
+We hope this particular problem with Java will be gone by and by, as
+we replace the remaining non-free standard Java libraries with free
+software, but the general principle will remain the same: don't
+recommend, promote or legitimize programs that depend on non-free
+software to run.
+
+Some free programs strongly encourage the use of non-free software.  A
+typical example is @command{mplayer}.  It is free software in itself,
+and the free code can handle some kinds of files.  However,
+@command{mplayer} recommends use of non-free codecs for other kinds of
+files, and users that install @command{mplayer} are very likely to
+install those codecs along with it.  To recommend @command{mplayer}
+is, in effect, to promote use of the non-free codecs.
+
+Thus, you should not recommend programs that strongly encourage the
+use of non-free software.  This is why we do not list
+@command{mplayer} in the Free Software Directory.
 
 A GNU package should not refer the user to any non-free documentation
 for free software.  Free documentation that can be included in free
 operating systems is essential for completing the GNU system, or any
-free operating system, so it is a major focus of the GNU Project; to
-recommend use of documentation that we are not allowed to use in GNU
-would weaken the impetus for the community to produce documentation
-that we can include.  So GNU packages should never recommend non-free
+free operating system, so encouraging it is a priority; to recommend
+use of documentation that we are not allowed to include undermines the
+impetus for the community to produce documentation that we can
+include.  So GNU packages should never recommend non-free
 documentation.
 
 By contrast, it is ok to refer to journal articles and textbooks in
 the comments of a program for explanation of how it functions, even
-though they be non-free.  This is because we don't include such things
-in the GNU system even if we are allowed to--they are outside the
-scope of an operating system project.
+though they are non-free.  This is because we don't include such
+things in the GNU system even if they are free---they are outside the
+scope of what a software distribution needs to include.
 
 Referring to a web site that describes or recommends a non-free
-program is in effect promoting that software, so please do not make
-links (or mention by name) web sites that contain such material.  This
-policy is relevant particularly for the web pages for a GNU package.
-
-Following links from nearly any web site can lead to non-free
-software; this is an inescapable aspect of the nature of the web, and
-in itself is no objection to linking to a site.  As long as the site
-does not itself recommend a non-free program, there is no need be
-concerned about the sites it links to for other reasons.
-
-Thus, for example, you should not make a link to AT&T's web site,
-because that recommends AT&T's non-free software packages; you should
-not make a link to a site that links to AT&T's site saying it is a
-place to get a non-free program; but if a site you want to link to
-refers to AT&T's web site in some other context (such as long-distance
-telephone service), that is not a problem.
-
-@node Copying This Manual
-@appendix Copying This Manual
-
-@menu
-* GNU Free Documentation License::  License for copying this manual
-@end menu
-
+program is promoting that program, so please do not make links (or
+mention by name) web sites that contain such material.  This policy is
+relevant particularly for the web pages for a GNU package.
+
+Following links from nearly any web site can lead eventually to
+non-free software; this is inherent in the nature of the web.  So it
+makes no sense to criticize a site for having such links.  As long as
+the site does not itself recommend a non-free program, there is no
+need to consider the question of the sites that it links to for other
+reasons.
+
+Thus, for example, you should not refer to AT&T's web site if that
+recommends AT&T's non-free software packages; you should not refer to
+a site that links to AT&T's site presenting it as a place to get some
+non-free program, because that link recommends and legitimizes the
+non-free program.  However, that a site contains a link to AT&T's web
+site for some other purpose (such as long-distance telephone service)
+is not an objection against it.
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
+@cindex FDL, GNU Free Documentation License
 @include fdl.texi
 
 @node Index
@@ -4014,5 +4191,5 @@ eval: (add-hook 'write-file-hooks 'time-stamp)
 time-stamp-start: "@set lastupdate "
 time-stamp-end: "$"
 time-stamp-format: "%:b %:d, %:y"
-compile-command: "make just-standards"
+compile-command: "cd work.s && make"
 End: