diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2017-05-17 15:44:46 +0200 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2017-05-17 15:44:46 +0200 |
commit | dfaac8d7d0cc16e070ecc441ab1f1ffeda3b7563 (patch) | |
tree | 3dc9bb5595e9333df15b3a56645dc4383b901a0d /Configure | |
parent | 9e716730a7a2ac25b33046db09cf147435f58b9f (diff) | |
download | perl-dfaac8d7d0cc16e070ecc441ab1f1ffeda3b7563.tar.gz |
fixed couple of compilation failures with g++ (JHI)
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -2896,7 +2896,6 @@ case "$lns" in *) echo "No symbolic links, so not testing for their testing..." >&4 ;; esac -echo " " : Make symlinks util case "$mksymlinks" in @@ -17114,8 +17113,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; @@ -17125,7 +17125,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++); @@ -20666,9 +20666,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 @@ -20685,7 +20689,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"); @@ -21015,7 +21020,7 @@ EOM ;; *) dtraceobject=$undef ;; esac - $rm -f try.c try.o perldtrace.o perldtrace.h + $rm_try perldtrace.o perldtrace.h esac : Determine if this is an EBCDIC system @@ -23055,7 +23060,7 @@ main(int argc, char **argv) { return 4; } - buffer = malloc(size); + buffer = (char *)malloc(size); if (!buffer) { perror("malloc"); return 5; @@ -23154,7 +23159,7 @@ main(int argc, char **argv) { return 2; } - buffer = malloc(size); + buffer = (char *)malloc(size); if (!buffer) { perror("malloc"); return 3; |