From: Gurusamy Sarathy Date: Wed, 23 Sep 1998 06:05:08 +0000 (+0000) Subject: make h2xs generate ANSI prototypes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d94c72661a5453999b626de9c44b63bc654fbd1a;p=p5sagit%2Fp5-mst-13.2.git make h2xs generate ANSI prototypes p4raw-id: //depot/perl@1818 --- diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 52f590b..44cb0fb 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -211,7 +211,7 @@ The usual warnings if it cannot read or write the files involved. =cut -my( $H2XS_VERSION ) = ' $Revision: 1.18 $ ' =~ /\$Revision:\s+([^\s]+)/; +my( $H2XS_VERSION ) = ' $Revision: 1.19 $ ' =~ /\$Revision:\s+([^\s]+)/; my $TEMPLATE_VERSION = '0.01'; use Getopt::Std; @@ -591,15 +591,9 @@ if( ! $opt_X ){ # print XS, unless it is disabled warn "Writing $ext$modpname/$modfname.xs\n"; print XS <<"END"; -#ifdef __cplusplus -extern "C" { -#endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" -#ifdef __cplusplus -} -#endif END if( @path_h ){ @@ -615,17 +609,14 @@ if( @path_h ){ if( ! $opt_c ){ print XS <<"END"; static int -not_here(s) -char *s; +not_here(char *s) { croak("$module::%s not implemented on this architecture", s); return -1; } static double -constant(name, arg) -char *name; -int arg; +constant(char *name, int arg) { errno = 0; switch (*name) {