Use __attribute__((unused)) to silence -Wall on unused ax.
[p5sagit/p5-mst-13.2.git] / plan9 / genconfig.pl
index 2ab6295..d934659 100644 (file)
@@ -10,7 +10,7 @@
 #
 
 #==== Locations of installed Perl components
-$p9pvers="5.00301";
+$p9pvers="_P9P_VERSION";
 $prefix='';
 $p9p_objtype=$ENV{'objtype'};
 $builddir="/sys/src/cmd/perl/$p9pvers";
@@ -82,7 +82,8 @@ eunicefix=':'
 hint='none'
 hintfile=''
 intsize='4'
-alignbytes='8'
+longsize='4'
+shortsize='2'
 shrplib='define'
 usemymalloc='n'
 usevfork='true'
@@ -127,24 +128,26 @@ print OUT "siglongjmp='siglongjmp(buf,retval) '\n";
 print OUT "exe_ext=''\n";
 if ($p9p_objtype eq '386') {
        $objext = '.8';
+       $alignbytes = '4';
+       $cstflags = 2;
 }
 elsif ($p9p_objtype eq '68020') {
        $objext = '.2';
+       $alignbytes = '2';
+       $cstflags = 0;
 }
 elsif ($p9p_objtype eq 'mips') {
        $objext = '.v';
+       $alignbytes = '8';
+       $cstflags = 0;
 }
 elsif ($p9p_objtype eq 'sparc') {
        $objext = '.k';
-}
-print OUT "obj_ext='$objext'\n";
-
-if ($p9p_objtype eq '386') {
-       $cstflags = 2;
-}
-else {
+       $alignbytes = '4';
        $cstflags = 0;
 }
+print OUT "obj_ext='$objext'\n";
+print OUT "alignbytes='$alignbytes'\n";
 print OUT "castflags='$cstflags'\n";
 
 $myname = $ENV{'site'} ;
@@ -258,12 +261,18 @@ foreach (sort keys %val_vars) {
 
 if (open(PL,"${outdir}patchlevel.h")) {
   while (<PL>) {
-    if    (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; }
-    elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; }
+    if    (/^#define PERL_VERSION\s+(\S+)/) {
+      print OUT "PERL_VERSION='$1'\n";
+      print OUT "PATCHLEVEL='$1'\n";           # XXX compat
+    }
+    elsif (/^#define PERL_SUBVERSION\s+(\S+)/) {
+      print OUT "PERL_SUBVERSION='$1'\n";
+      print OUT "SUBVERSION='$1'\n";           # XXX compat
+    }
   }
   close PL;
 }
-else { warn "Can't read ${outdir}patchlevel.h - skipping 'PATCHLEVEL'"; }
+else { warn "Can't read ${outdir}patchlevel.h - skipping 'PERL_VERSION'"; }
 
 print OUT "pager='/bin/p'\n";