summaryrefslogtreecommitdiff
path: root/lib/xstrtol.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-01-23 21:07:39 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-01-23 21:08:07 -0800
commit8ecf07a95175c6cf4c62c0800555c19207dad251 (patch)
tree58c7d971ee9ae0ba18dbdbef432bea4c5ebe6ee7 /lib/xstrtol.c
parenta319a3a16e3804b685f03c9f7f0156e64033666b (diff)
downloadgnulib-8ecf07a95175c6cf4c62c0800555c19207dad251.tar.gz
xstrtoimax, xstrtoumax: depend on inttypes-incomplete
This fixes a call to strtoimax without declaring it, and similarly for strtoumax. * lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H): Define, so that strtoimax and strtoumax are declared. * lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h. * modules/xstrtoimax, modules/xstrtoumax (Depends-on): Add inttypes-incomplete.
Diffstat (limited to 'lib/xstrtol.c')
-rw-r--r--lib/xstrtol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index 3e2efb2a17..e0a692ff2c 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -40,6 +40,10 @@
#include <stdlib.h>
#include <string.h>
+#if XSTRTOL_INCLUDE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
#include "assure.h"
#include "intprops.h"