]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Standardize on the spelling of "Unix". Explain !'s problems.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 May 2004 19:24:20 +0000 (19:24 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 May 2004 19:24:20 +0000 (19:24 +0000)
ChangeLog
doc/autoconf.texi

index 32810f80d0861094227027d909d02e841fc8778b..ba88bfca14e24dee8ff40542c4568e7992918492 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * doc/autoconf.texi (Systemology): Standardize on the spelling of
+       "Unix".  Many uses changed.
+       (Limitations of Builtins): Explain better why the ! command isn't
+       portable.
+
 2004-05-22  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/autom4te.in (Automake-preselections): Preselect
index 94efba22a3e1f5278e4b149217a1367783eca7db..71aa55301f4e4f6128f38762c5e9f9c1986c8775 100644 (file)
@@ -342,7 +342,7 @@ Existing Tests
 * Types::                       Types that might be missing
 * Compilers and Preprocessors::  Checking for compiling programs
 * System Services::             Operating system services
-* UNIX Variants::               Special kludges for specific UNIX variants
+* Unix Variants::               Special kludges for specific Unix variants
 
 Common Behavior
 
@@ -603,7 +603,7 @@ shouted: ``And the Chaos, where do you think it was coming from, hmm?''
 
 Autoconf is a tool for producing shell scripts that automatically
 configure software source code packages to adapt to many kinds of
-@sc{unix}-like systems.  The configuration scripts produced by Autoconf
+Unix-like systems.  The configuration scripts produced by Autoconf
 are independent of Autoconf when they are run, so their users do not
 need to have Autoconf.
 
@@ -614,9 +614,9 @@ presence of each feature that the software package they are for might need.
 (Before each check, they print a one-line message stating what they are
 checking for, so the user doesn't get too bored while waiting for the
 script to finish.)  As a result, they deal well with systems that are
-hybrids or customized from the more common @sc{unix} variants.  There is
+hybrids or customized from the more common Unix variants.  There is
 no need to maintain files that list the features supported by each
-release of each variant of @sc{unix}.
+release of each variant of Unix.
 
 For each software package that Autoconf is used with, it creates a
 configuration script from a template file that lists the system features
@@ -646,7 +646,7 @@ Autoconf imposes some restrictions on the names of macros used with
 @code{#if} in C programs (@pxref{Preprocessor Symbol Index}).
 
 Autoconf requires @acronym{GNU} M4 in order to generate the scripts.  It uses
-features that some @sc{unix} versions of M4, including @acronym{GNU} M4 1.3,
+features that some Unix versions of M4, including @acronym{GNU} M4 1.3,
 do not have.  You must use version 1.4 or later of @acronym{GNU} M4.
 
 @xref{Autoconf 1}, for information about upgrading from version 1.
@@ -3080,7 +3080,7 @@ Symbols}, for how to get those symbol definitions into your program.
 * Types::                       Types that might be missing
 * Compilers and Preprocessors::  Checking for compiling programs
 * System Services::             Operating system services
-* UNIX Variants::               Special kludges for specific UNIX variants
+* Unix Variants::               Special kludges for specific Unix variants
 @end menu
 
 @node Common Behavior
@@ -4042,7 +4042,7 @@ program.
 @c @fuindex getmntent
 @prindex @code{getmntent}
 Check for @code{getmntent} in the @file{sun}, @file{seq}, and @file{gen}
-libraries, for @sc{irix} 4, PTX, and Unixware, respectively.  Then, if
+libraries, for @sc{irix} 4, PTX, and UnixWare, respectively.  Then, if
 @code{getmntent} is available, define @code{HAVE_GETMNTENT}.
 @end defmac
 
@@ -4295,7 +4295,7 @@ the buffer argument.
 @cvindex HAVE_STRFTIME
 @c @fuindex strftime
 @prindex @code{strftime}
-Check for @code{strftime} in the @file{intl} library, for SCO @sc{unix}.
+Check for @code{strftime} in the @file{intl} library, for SCO Unix.
 Then, if @code{strftime} is available, define @code{HAVE_STRFTIME}.
 @end defmac
 
@@ -6219,8 +6219,8 @@ system.  If so, set the shell variable @code{ac_cv_sys_posix_termios} to
 @samp{yes}.  If not, set the variable to @samp{no}.
 @end defmac
 
-@node UNIX Variants
-@section UNIX Variants
+@node Unix Variants
+@section Unix Variants
 
 The following macros check for certain operating systems that need
 special treatment for some programs, due to exceptional oddities in
@@ -6854,7 +6854,7 @@ documentation.  It may help you addressing particular problems reported
 by users.
 
 The @href{http://bhami.com/rosetta.html, Rosetta Stone for Unix}
-contains a lot of interesting crossed information on various Unices.
+contains a lot of interesting crossed information on various Unix variants.
 
 @table @asis
 @item Darwin
@@ -6893,8 +6893,12 @@ formats.
 @item Unix version 7
 @cindex Unix version 7
 @cindex V7
+Officially this was called the ``Seventh Edition'' of ``the @sc{unix}
+time-sharing system'' but we use the more-common name ``Unix version 7''.
 Documentation is available in the
 @href{http://plan9.bell-labs.com/7thEdMan/index.html, V7 Manual}.
+Previous versions of Unix are called ``Unix version 6'', etc., but
+they were not as widely used.
 @end table
 
 
@@ -6902,7 +6906,7 @@ Documentation is available in the
 @section Multiple Cases
 
 Some operations are accomplished in several possible ways, depending on
-the @sc{unix} variant.  Checking for them essentially requires a ``case
+the Unix variant.  Checking for them essentially requires a ``case
 statement''.  Autoconf does not directly provide one; however, it is
 easy to simulate by using a shell variable to keep track of whether a
 way to perform the operation has been found yet.
@@ -8762,7 +8766,7 @@ Declarations of C variables in header files.
 @item FUNC
 Functions in libraries.
 @item GROUP
-@sc{unix} group owners of files.
+Unix group owners of files.
 @item HEADER
 Header files.
 @item LIB
@@ -9243,7 +9247,7 @@ When writing your own checks, there are some shell-script programming
 techniques you should avoid in order to make your code portable.  The
 Bourne shell and upward-compatible shells like the Korn shell and Bash
 have evolved over the years, but to prevent trouble, do not take
-advantage of features that were added after @sc{unix} version 7, circa
+advantage of features that were added after Unix version 7, circa
 1977 (@pxref{Systemology}).
 
 You should not use shell functions, aliases, negated character
@@ -9635,7 +9639,7 @@ identifies problems that exist even under Windows.
 important thing to remember when building a portable configure script,
 as @command{autoconf} uses a .in suffix for template files.
 
-This is perfectly OK on Unices:
+This is perfectly OK on Unix variants:
 
 @example
 AC_CONFIG_HEADERS([config.h])
@@ -9728,7 +9732,7 @@ strings inside double-quoted back-quoted expressions (pfew!).
 One of the most famous shell-portability issues is related to
 @samp{"$@@"}.  When there are no positional arguments, @acronym{POSIX} says
 that @samp{"$@@"} is supposed to be equivalent to nothing, but the
-original Unix Version 7 Bourne shell treated it as equivalent to
+original Unix version 7 Bourne shell treated it as equivalent to
 @samp{""} instead, and this behavior survives in later implementations
 like Digital Unix 5.0.
 
@@ -10360,7 +10364,23 @@ directory, you must use @samp{. ./foo}.
 
 @item @command{!}
 @prindex @command{!}
-You can't use @command{!}; you'll have to rewrite your code.
+The Unix version 7 shell did not support
+negating the exit status of commands with @command{!}, and this feature
+is still absent from more modern shells (e.g., Solaris 9 @command{/bin/sh}).
+Shell code like this:
+
+@example
+if ! cmp file1 file2 >/dev/null 2>&1; then
+  echo files differ or trouble
+fi
+@end example
+
+is therefore not portable in practice.  Typically it is easy to rewrite
+such code, e.g.:
+
+@example
+cmp file1 file2 >/dev/null 2>&1 || echo files differ or trouble
+@end example
 
 
 @item @command{break}
@@ -10408,7 +10428,7 @@ bash-2.02$
 
 @noindent
 This is extremely unfortunate, since you are likely to use this code to
-handle @sc{unix} or @sc{ms-dos} absolute paths.  To work around this
+handle Unix or @sc{ms-dos} absolute paths.  To work around this
 bug, always put the backslash first:
 
 @example
@@ -10509,7 +10529,7 @@ received by the shell when it is launched should be imported as a shell
 variable marked as exported.
 
 Alas, many shells, such as Solaris 2.5, @sc{irix} 6.3, @sc{irix} 5.2,
-@acronym{AIX} 4.1.5, and Digital @sc{unix} 4.0, forget to
+@acronym{AIX} 4.1.5, and Digital Unix 4.0, forget to
 @command{export} the environment variables they receive.  As a result,
 two variables coexist: the environment variable and the shell
 variable.  The following code demonstrates this failure:
@@ -10982,7 +11002,7 @@ lack support for it.  @xref{C Compiler}, for how @acronym{GNU} Make
 tests for this feature with @code{AC_PROG_CC_C_O}.
 
 When a compilation such as @samp{cc -o foo foo.c} fails, some compilers
-(such as @sc{cds} on Reliant @sc{unix}) leave a @file{foo.o}.
+(such as @sc{cds} on Reliant Unix) leave a @file{foo.o}.
 
 HP-UX @command{cc} doesn't accept @file{.S} files to preprocess and
 assemble.  @samp{cc -c foo.S} will appear to succeed, but in fact does
@@ -11187,9 +11207,9 @@ expr '' \| ''
 @end example
 
 @acronym{GNU}/Linux and @acronym{POSIX}.2-1992 return the empty string
-for this case, but traditional @sc{unix} returns @samp{0} (Solaris is
+for this case, but traditional Unix returns @samp{0} (Solaris is
 one such example).  In @acronym{POSIX}.1-2001, the specification has
-been changed to match traditional @sc{unix}'s behavior (which is
+been changed to match traditional Unix's behavior (which is
 bizarre, but it's too late to fix this).  Please note that the same
 problem does arise when the empty string results from a computation,
 as in:
@@ -11343,7 +11363,7 @@ The portable options are @option{-acdilrtu}.  Modern practice is for
 @c
 @c # telnet dim
 @c [...]
-@c   UNIX System V (TWG-TCP/IP) (dim.blilly.com)
+@c   Unix System V (TWG-TCP/IP) (dim.blilly.com)
 @c [...]
 @c $ mkdir foo
 @c $ cd foo
@@ -11353,7 +11373,7 @@ The portable options are @option{-acdilrtu}.  Modern practice is for
 @c /bin/ls:
 @c           fndcmd:fndcmd.sl 1.68
 @c $ uname -a
-@c UNIX dim SYSTEM5 3.51m mc68k
+@c Unix dim SYSTEM5 3.51m mc68k
 @c
 @c It's an AT&T 3B1.  See http://www.faqs.org/faqs/3b1-faq/ or any
 @c mirror of the 3B1 FAQ.  It's actually SVR2.2.
@@ -11399,7 +11419,8 @@ older versions are not thread-safe either).
 @cindex Moving open files
 The only portable options are @option{-f} and @option{-i}.
 
-Moving individual files between file systems is portable (it was in V6),
+Moving individual files between file systems is portable (it was in Unix
+version 6),
 but it is not always atomic: when doing @samp{mv new existing}, there's
 a critical section where neither the old nor the new version of
 @file{existing} actually exists.
@@ -11499,7 +11520,8 @@ sed @var{instruction-1};@var{instruction-2}
 
 Contrary to yet another urban legend, you may portably use @samp{&} in
 the replacement part of the @code{s} command to mean ``what was
-matched''.  All descendants of Bell Lab's V7 @command{sed} (at least; we
+matched''.  All descendants of Bell Lab's Unix version 7 @command{sed}
+(at least; we
 don't have first hand experience with older @command{sed}s) have
 supported it.
 
@@ -13787,7 +13809,7 @@ Use @samp{AC_CHECK_SIZEOF(int)} instead.
 
 @defmac AC_IRIX_SUN
 @acindex{IRIX_SUN}
-If on @sc{irix} (Silicon Graphics @sc{unix}), add @option{-lsun} to output
+If on @sc{irix} (Silicon Graphics Unix), add @option{-lsun} to output
 @code{LIBS}.  If you were using it to get @code{getmntent}, use
 @code{AC_FUNC_GETMNTENT} instead.  If you used it for the NIS versions
 of the password and group functions, use @samp{AC_CHECK_LIB(sun,
@@ -14062,7 +14084,7 @@ removed because of limited usefulness
 @defmac AC_SCO_INTL
 @acindex{SCO_INTL}
 @ovindex LIBS
-If on SCO UNIX, add @option{-lintl} to output variable @code{LIBS}.  This
+If on SCO Unix, add @option{-lintl} to output variable @code{LIBS}.  This
 macro used to
 
 @example
@@ -15098,7 +15120,7 @@ need, but therefore most of the time it contains all that is needed:
 @table @asis
 @item command line arguments
 @c akim s/to consist in/to consist of/
-A very bad Unix habit which is unfortunately wide spread consists of
+A very bad Unix habit which is unfortunately widespread consists of
 setting environment variables before the command, such as in
 @samp{CC=my-home-grown-cc ./testsuite}.  This results in the test suite
 not knowing this change, hence (i) it can't report it to you, and (ii)
@@ -15947,7 +15969,7 @@ out a new language.
 Since my @command{configure} scripts determine the system's capabilities
 automatically, with no interactive user intervention, I decided to call
 the program that generates them Autoconfig.  But with a version number
-tacked on, that name would be too long for old @sc{unix} file systems,
+tacked on, that name would be too long for old Unix file systems,
 so I shortened it to Autoconf.
 
 In the fall of 1991 I called together a group of fellow questers after
@@ -15980,7 +16002,7 @@ Autoconf continued to improve rapidly, as many people using the
 @command{configure} scripts reported problems they encountered.
 
 Autoconf turned out to be a good torture test for M4 implementations.
-@sc{unix} M4 started to dump core because of the length of the
+Unix M4 started to dump core because of the length of the
 macros that Autoconf defined, and several bugs showed up in @acronym{GNU}
 M4 as well.  Eventually, we realized that we needed to use some
 features that only @acronym{GNU} M4 has.  4.3@acronym{BSD} M4, in