X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fgnulib-intro.texi;h=09ac675eeacdfb800f1153343f0cdb1d92b0ace4;hb=2fbe772172eb8f078031d68030e3b85c5bd8d57b;hp=29b918fbfbc23bad7450b8c1041564cd3be503b1;hpb=c231865128c6a323e87cbf0ba904a2078f21faf7;p=gnulib.git diff --git a/doc/gnulib-intro.texi b/doc/gnulib-intro.texi index 29b918fbf..09ac675ee 100644 --- a/doc/gnulib-intro.texi +++ b/doc/gnulib-intro.texi @@ -1,3 +1,37 @@ +@node Benefits +@section Benefits of using Gnulib + +Gnulib is useful to enhance various aspects of a package: + +@itemize @bullet +@item +Portability: With Gnulib, a package maintainer can program against the +POSIX and GNU libc APIs and nevertheless expect good portability to +platforms that don't implement POSIX. + +@item +Maintainability: When a package uses modules from Gnulib instead of code +written specifically for that package, the maintainer has less code to +maintain. + +@item +Security: Gnulib provides functions that are immune against vulnerabilities +that plague the uses of the corresponding commonplace functions. For +example, @code{asprintf}, @code{canonicalize_file_name} are not affected +by buffer sizing problems that affect @code{sprintf}, @code{realpath}. +@code{openat} does not have the race conditions that @code{open} has. Etc. + +@item +Reliability: Gnulib provides functions that combine a call to a system +function with a check of the result. Examples are @code{xalloc}, +@code{xprintf}, @code{xstrtod}, @code{xgetcwd}. + +@item +Structure: Gnulib offers a way to structure code into modules, typically +one include file, one source code file, and one autoconf macro for each +functionality. Modularity helps maintainability. +@end itemize + @node Library vs Reusable Code @section Library vs. Reusable Code @@ -250,9 +284,9 @@ not a problem, since compiled tests are not installed by ``make install''. Documentation files are under this copyright: @quotation -Copyright @copyright{} 2004-2008 Free Software Foundation, Inc.@* +Copyright @copyright{} 2004-200Y 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.2 or +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, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free