This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix strtoul probe to compile under clang++.
authorAndy Dougherty <doughera@lafayete.edu>
Tue, 31 Dec 2019 00:50:41 +0000 (19:50 -0500)
committerAndy Dougherty <doughera@lafayete.edu>
Tue, 31 Dec 2019 02:03:23 +0000 (21:03 -0500)
Add the missing stdlib.h header and remove an unnecessary prototype.

U/modified/d_strtoul.U

index 45a38c4..01c7735 100644 (file)
@@ -40,9 +40,9 @@ EOM
        $cat >try.c <<'EOCP'
 #include <errno.h>
 #include <stdio.h>
-extern unsigned long int strtoul(char *s, char **, int);
+#include <stdlib.h>
 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);