changeset 39821:849fcaf40bbf

xstrtoll: Rely on limits-h module. * lib/xstrtol.c: Don't include intprops.h. (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions. * modules/xstrtol (Depends-on): Remove 'intprops'. * modules/xstrtoll (Depends-on): Add 'limits-h'.
author Bruno Haible <bruno@clisp.org>
date Thu, 06 Sep 2018 14:46:06 +0200
parents 1f42ad97158b
children 42f02b3c8b20
files ChangeLog lib/xstrtol.c modules/xstrtol modules/xstrtoll
diffstat 4 files changed, 9 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 06 14:41:00 2018 +0200
+++ b/ChangeLog	Thu Sep 06 14:46:06 2018 +0200
@@ -1,3 +1,11 @@
+2018-09-06  Bruno Haible  <bruno@clisp.org>
+
+	xstrtoll: Rely on limits-h module.
+	* lib/xstrtol.c: Don't include intprops.h.
+	(ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
+	* modules/xstrtol (Depends-on): Remove 'intprops'.
+	* modules/xstrtoll (Depends-on): Add 'limits-h'.
+
 2018-09-06  Bruno Haible  <bruno@clisp.org>
 
 	strtoll, strtoull: Rely on limits-h module.
--- a/lib/xstrtol.c	Thu Sep 06 14:41:00 2018 +0200
+++ b/lib/xstrtol.c	Thu Sep 06 14:46:06 2018 +0200
@@ -41,20 +41,6 @@
 #include <string.h>
 
 #include "assure.h"
-#include "intprops.h"
-
-/* xstrtoll.c and xstrtoull.c, which include this file, require that
-   ULLONG_MAX, LLONG_MAX, LLONG_MIN are defined, but <limits.h> does not
-   define them on all platforms.  */
-#ifndef ULLONG_MAX
-# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long)
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX TYPE_MAXIMUM (long long int)
-#endif
-#ifndef LLONG_MIN
-# define LLONG_MIN TYPE_MINIMUM (long long int)
-#endif
 
 static strtol_error
 bkm_scale (__strtol_t *x, int scale_factor)
--- a/modules/xstrtol	Thu Sep 06 14:41:00 2018 +0200
+++ b/modules/xstrtol	Thu Sep 06 14:46:06 2018 +0200
@@ -14,7 +14,6 @@
 error
 getopt-gnu
 gettext-h
-intprops
 inttypes-incomplete
 
 configure.ac:
--- a/modules/xstrtoll	Thu Sep 06 14:41:00 2018 +0200
+++ b/modules/xstrtoll	Thu Sep 06 14:46:06 2018 +0200
@@ -6,6 +6,7 @@
 lib/xstrtoull.c
 
 Depends-on:
+limits-h
 strtoll
 strtoull
 xstrtol