summaryrefslogtreecommitdiff
path: root/modules/strtol
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-04-02 20:42:13 +0200
committerBruno Haible <bruno@clisp.org>2021-04-02 20:42:13 +0200
commit705c23696fcaf5bd9d4f0aaecd106b4a2c1417b2 (patch)
tree44bd091848a15c9d7bf43f6230982491bd449709 /modules/strtol
parent837ffb5ee4585ce6947e1013d03c7d6f21cbd635 (diff)
downloadgnulib-705c23696fcaf5bd9d4f0aaecd106b4a2c1417b2.tar.gz
strtol: Work around a bug on native Windows and Minix.
* lib/stdlib.in.h (strtol): New declaration. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL, REPLACE_STRTOL. * m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test whether strtol works. Set REPLACE_STRTOL. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL, REPLACE_STRTOL. * modules/strtol (Status, Notice): Remove. (Depends-on): Add stdlib. (configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke gl_STDLIB_MODULE_INDICATOR. * tests/test-strtol.c (main): Add tests of hexadecimal integer syntax. * doc/posix-functions/strtol.texi: Mention the bug.
Diffstat (limited to 'modules/strtol')
-rw-r--r--modules/strtol10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/strtol b/modules/strtol
index 65b6946390..24d4c734db 100644
--- a/modules/strtol
+++ b/modules/strtol
@@ -1,23 +1,19 @@
Description:
strtol() function: convert string to 'long'.
-Status:
-obsolete
-
-Notice:
-This module is obsolete.
-
Files:
lib/strtol.c
m4/strtol.m4
Depends-on:
+stdlib
configure.ac:
gl_FUNC_STRTOL
-if test $ac_cv_func_strtol = no; then
+if test $HAVE_STRTOL = 0 || test $REPLACE_STRTOL = 1; then
AC_LIBOBJ([strtol])
fi
+gl_STDLIB_MODULE_INDICATOR([strtol])
Makefile.am: