summaryrefslogtreecommitdiff
path: root/lib/xstrtol-error.c
diff options
context:
space:
mode:
authorPino Toscano <ptoscano@redhat.com>2019-12-05 16:18:35 +0100
committerBruno Haible <bruno@clisp.org>2019-12-07 10:39:56 +0100
commita762d02b8efb0754e5d9f4491588214130a2657f (patch)
treed0796c7078a2ee954231696a291f0fddb80c39c6 /lib/xstrtol-error.c
parent1c740444c9224c81b92c4375babc73efe57e1dc9 (diff)
downloadgnulib-a762d02b8efb0754e5d9f4491588214130a2657f.tar.gz
Move xstrtol_fatal to a new xstrtol-error module
The xstrtol module provides a xstrtol_fatal function which uses other modules suitable mostly for command line handling (e.g. gettext, getopt), and that are completely unused when using only xstrto* functions. Furthermore, xstrtol_fatal is used only in the xstrtol-tests (within gnulib itself). As solution, move the xstrtol_fatal to a new xstrtol-error module, making xstrtol-tests depend on it. Since the prototype of xstrtol_fatal is automatically provided by xstrtol.h, it is very difficult to know whether anyone is actually using it, so add a note about this in NEWS. * lib/xstrtol.h: Stop including <getopt.h>. (xstrtol_fatal): Move ... * lib/xstrtol-error.h: ... here. New file. * lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h. * tests/test-xstrtol.c: Likewise. * modules/xstrtol (Files): Remove lib/xstrtol-error.c. (Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h. (Makefile.am): Remove xstrtol-error.c from lib_SOURCES. * modules/xstrtol-error: New file. * modules/xstrtol-tests (Depends-on): Add xstrtol-error. * MODULES.html.sh: Add xstrtol-error. * NEWS: Document the change.
Diffstat (limited to 'lib/xstrtol-error.c')
-rw-r--r--lib/xstrtol-error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xstrtol-error.c b/lib/xstrtol-error.c
index a0d10c2856..386d22b2d9 100644
--- a/lib/xstrtol-error.c
+++ b/lib/xstrtol-error.c
@@ -17,7 +17,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
-#include "xstrtol.h"
+#include "xstrtol-error.h"
#include <stdlib.h>