1 @node error and progname
2 @section error and progname
7 @c Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
9 @c Permission is granted to copy, distribute and/or modify this document
10 @c under the terms of the GNU Free Documentation License, Version 1.3 or
11 @c any later version published by the Free Software Foundation; with no
12 @c Invariant Sections, no Front-Cover Texts, and no Back-Cover
13 @c Texts. A copy of the license is included in the ``GNU Free
14 @c Documentation License'' file as part of this distribution.
16 The @code{error} function uses the @code{program_name} variable, but
17 does not depend on the @code{progname} module. Why? Because
18 @code{error} is released under the LGPL, whereas @code{progname} is
19 GPL. RMS does not want additional baggage accompanying the
20 @code{error} module, so an LGPL user must provide their own
21 replacement @code{program_name}, and a GPL user should manually
22 specify using the @code{progname} module.
24 Additionally, using the @code{progname} module is not something that
25 can be done implicitly. It requires that every @code{main} function
26 be modified to set @code{program_name} as one of its first actions.