summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-09-23 06:05:08 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-09-23 06:05:08 +0000
commitd94c72661a5453999b626de9c44b63bc654fbd1a (patch)
treee73e4dc53715246672175d50cd149000a59fcdfe /utils
parent8ac5a1fe856ae9296e1a0c7e52d5e675b059eff4 (diff)
downloadperl-d94c72661a5453999b626de9c44b63bc654fbd1a.tar.gz
make h2xs generate ANSI prototypes
p4raw-id: //depot/perl@1818
Diffstat (limited to 'utils')
-rw-r--r--utils/h2xs.PL15
1 files changed, 3 insertions, 12 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL
index 52f590b776..44cb0fb242 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) {