summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2019-08-27 15:22:05 -0400
committerAndy Dougherty <doughera@lafayette.edu>2019-12-29 17:39:32 -0500
commitb4f9118ea19bf5b206dccb6a57283324ea8cc431 (patch)
tree9ab23d791f7a14413193532d8f1a7657efe63ee9 /Configure
parent7454e5720486ba26c2e118be22fa882782f4a00b (diff)
downloadperl-b4f9118ea19bf5b206dccb6a57283324ea8cc431.tar.gz
Fix strtoll, strtoul, and strtouq probes to compile under clang++.
The test programs were missing the stdlib.h header, and needed tweaks to the check() prototype to compile under clang++. These changes should be fine for C compilers as well, but they have typically been more forgiving, so shouldn't be affected.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure12
1 files changed, 6 insertions, 6 deletions
diff --git a/Configure b/Configure
index 9f959c835e..8d67b395e9 100755
--- a/Configure
+++ b/Configure
@@ -19105,9 +19105,9 @@ EOM
#define strtoll _strtoll
#endif
#include <stdio.h>
-extern long long int strtoll(char *s, char **, int);
+#include <stdlib.h>
static int bad = 0;
-int check(char *s, long long ell, int een) {
+void check(const char *s, long long ell, int een) {
long long gll;
errno = 0;
gll = strtoll(s, 0, 10);
@@ -19160,11 +19160,11 @@ case "$d_strtoul" in
Checking whether your strtoul() works okay...
EOM
$cat >try.c <<'EOCP'
+#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
-extern unsigned long int strtoul(char *s, char **, int);
static int bad = 0;
-void check(char *s, unsigned long eul, int een) {
+void check(const char *s, unsigned long eul, int een) {
unsigned long gul;
errno = 0;
gul = strtoul(s, 0, 10);
@@ -19297,11 +19297,11 @@ case "$d_strtouq" in
Checking whether your strtouq() works okay...
EOM
$cat >try.c <<'EOCP'
+#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
-extern unsigned long long int strtouq(char *s, char **, int);
static int bad = 0;
-void check(char *s, unsigned long long eull, int een) {
+void check(const char *s, unsigned long long eull, int een) {
unsigned long long gull;
errno = 0;
gull = strtouq(s, 0, 10);