In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/750f8630e9a2ab75bdd799100ac734d8f9eacfd1?hp=9bc8253768fda9594f631db761010690666694c3>

- Log -----------------------------------------------------------------
commit 750f8630e9a2ab75bdd799100ac734d8f9eacfd1
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Wed May 17 15:41:35 2017 +0200

    fixed couple of compilation failures with g++ (JHI)
-----------------------------------------------------------------------

Summary of changes:
 U/perl/infnan.U                 | 9 +++++++--
 U/perl/perlxv.U                 | 7 ++++---
 U/perl/usekernprocpathname.U    | 2 +-
 U/perl/usensgetexecutablepath.U | 2 +-
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/U/perl/infnan.U b/U/perl/infnan.U
index 7a248cda..a62055a2 100644
--- a/U/perl/infnan.U
+++ b/U/perl/infnan.U
@@ -6,7 +6,7 @@
 ?RCS: License or the Artistic License, as specified in the README file.
 ?RCS:
 ?MAKE:longdblinfbytes longdblnanbytes doubleinfbytes doublenanbytes: Inlibc \
-       cat i_math Compile run rm_try Setvar echo d_longdbl \
+       cat i_math i_string Compile run rm_try Setvar echo d_longdbl \
        doublekind doublesize longdblkind longdblsize
 ?MAKE: -pick add $@ %<
 ?S:longdblinfbytes:
@@ -58,9 +58,13 @@ $cat >try.c <<EOP
 #define LONG_DOUBLEKIND $longdblkind
 #endif
 #$i_math I_MATH
+#$i_string I_STRING
 #ifdef I_MATH
 #include <math.h>
 #endif
+#ifdef I_STRING
+#  include <string.h>
+#endif
 #include <stdio.h>
 /* Note that whether the sign bit is on or off
  * for NaN depends on the CPU/FPU, and possibly
@@ -77,7 +81,8 @@ $cat >try.c <<EOP
  * to even mention, causing immediate SIGFPE or equivalent: this is
  * the case with VAX floating point, for example.
  */
-static void bytes(unsigned char *p, unsigned int n) {
+static void bytes(void *v, unsigned int n) {
+  unsigned char *p = (unsigned char *)v;
   int i;
   for (i = 0; i < n; i++) {
     printf("0x%02x%s", p[i], i < n - 1 ? ", " : "\n");
diff --git a/U/perl/perlxv.U b/U/perl/perlxv.U
index b5e0be00..e2c574b3 100644
--- a/U/perl/perlxv.U
+++ b/U/perl/perlxv.U
@@ -599,8 +599,9 @@ $volatile int bletched = 0;
 $signal_t blech(int s) { bletched = 1; }
 #endif
 
-int checkit($nvtype d, char *where) {
-    unsigned char *p = (char *)&d;
+int checkit($nvtype d, const char *where) {
+    void *v = &d;
+    unsigned char *p = (unsigned char *)v;
     unsigned char *end = p + sizeof(d);
     int fail = 0;
 
@@ -610,7 +611,7 @@ int checkit($nvtype d, char *where) {
     if (!fail)
        return 0;
 
-    p = (char *)&d;
+    p = (unsigned char *)v;
     printf("No - %s: 0x", where);
     while (p < end)
        printf ("%02X", *p++);
diff --git a/U/perl/usekernprocpathname.U b/U/perl/usekernprocpathname.U
index fcc1979c..4da404c9 100644
--- a/U/perl/usekernprocpathname.U
+++ b/U/perl/usekernprocpathname.U
@@ -65,7 +65,7 @@ main(int argc, char **argv) {
        return 4;
     }
 
-    buffer = malloc(size);
+    buffer = (char *)malloc(size);
     if (!buffer) {
        perror("malloc");
        return 5;
diff --git a/U/perl/usensgetexecutablepath.U b/U/perl/usensgetexecutablepath.U
index 4eb61de0..60c1bbdb 100644
--- a/U/perl/usensgetexecutablepath.U
+++ b/U/perl/usensgetexecutablepath.U
@@ -49,7 +49,7 @@ main(int argc, char **argv) {
        return 2;
     }
 
-    buffer = malloc(size);
+    buffer = (char *)malloc(size);
     if (!buffer) {
        perror("malloc");
        return 3;

--
perl5 metaconfig repository

Reply via email to