From: Jarkko Hietaniemi Date: Mon, 31 Jul 2006 23:44:55 +0000 (+0300) Subject: ANSI-C headers in test snippets to please g++ (and the rest) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7090f861aa9f6c1a4d8e1a3a5b34ee574cc9689e;p=p5sagit%2Fp5-mst-13.2.git ANSI-C headers in test snippets to please g++ (and the rest) Subject: [PATCH] (back) towards g++ compilation (in Tru64, and elsewhere) Message-ID: <44CE6BC7.8060805@iki.fi> p4raw-id: //depot/perl@28637 --- diff --git a/Configure b/Configure index d3da667..7f3c637 100755 --- a/Configure +++ b/Configure @@ -26,7 +26,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Jun 6 20:32:43 CEST 2006 [metaconfig 3.0 PL70] +# Generated on Tue Aug 1 10:44:27 CEST 2006 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <try.c < #include -$signal_t blech(s) int s; { exit(3); } +$signal_t blech(int s) { exit(3); } int main() { $xxx i32; @@ -10563,11 +10563,11 @@ $cat >try.c < #include -$signal_t blech(s) int s; { exit(7); } -$signal_t blech_in_list(s) int s; { exit(4); } -unsigned long dummy_long(p) unsigned long p; { return p; } -unsigned int dummy_int(p) unsigned int p; { return p; } -unsigned short dummy_short(p) unsigned short p; { return p; } +$signal_t blech(int s) { exit(7); } +$signal_t blech_in_list(int s) { exit(4); } +unsigned long dummy_long(unsigned long p) { return p; } +unsigned int dummy_int(unsigned int p) { return p; } +unsigned short dummy_short(unsigned short p) { return p; } int main() { double f; @@ -12062,7 +12062,7 @@ extern int errno; #else #include #endif -$signal_t blech(x) int x; { exit(3); } +$signal_t blech(int x) { exit(3); } EOCP $cat >> try.c <<'EOCP' int main() @@ -12495,7 +12495,7 @@ $cat >try.c < #include #include -$signal_t blech(x) int x; { exit(3); } +$signal_t blech(int x) { exit(3); } int main() { #if defined(F_SETLK) && defined(F_SETLKW) struct flock flock; @@ -15048,7 +15048,7 @@ $cat <try.c #include #ifdef SIGFPE $volatile int bletched = 0; -$signal_t blech(s) int s; { bletched = 1; } +$signal_t blech(int s) { bletched = 1; } #endif int main() { $uvtype u = 0; @@ -15120,7 +15120,7 @@ $cat <try.c #include #ifdef SIGFPE $volatile int bletched = 0; -$signal_t blech(s) int s; { bletched = 1; } +$signal_t blech(int s) { bletched = 1; } #endif int checkit($nvtype d, char *where) { @@ -17736,7 +17736,7 @@ case "$d_u32align" in #define U8 $u8type #include #ifdef SIGBUS -$signal_t bletch(s) int s; { exit(4); } +$signal_t bletch(int s) { exit(4); } #endif int main() { #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321 @@ -19536,7 +19536,7 @@ $selecttype b; #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8) #define NBITS (NBYTES * 8) int main() { - char *s = malloc(NBYTES); + char *s = (char *)malloc(NBYTES); struct timeval t; int i; FILE* fp;