Author: nickg
Date: Tue Jan 10 02:29:25 2006
New Revision: 11038

Modified:
   trunk/tools/build/parrot_config_c.pl
Log:
Complain if the frozen config values are truncated. This can happen after
miniparrot has segfaulted, and can lead to some visible problems
such as src/parrot_config.c not compiling on some fussy compiler, or the
subtle one of subsequently running with null config.


Modified: trunk/tools/build/parrot_config_c.pl
==============================================================================
--- trunk/tools/build/parrot_config_c.pl        (original)
+++ trunk/tools/build/parrot_config_c.pl        Tue Jan 10 02:29:25 2006
@@ -32,8 +32,8 @@ use strict;
 
 my ($mini_parrot, $install_parrot);
 
-$mini_parrot = 1    if (@ARGV && $ARGV[0] =~ /mini/);
-$install_parrot = 1 if (@ARGV && $ARGV[0] =~ /install/);
+$mini_parrot = 1    if @ARGV && $ARGV[0] =~ /mini/;
+$install_parrot = 1 if @ARGV && $ARGV[0] =~ /install/;
 
 print << "EOF";
 /*
@@ -69,9 +69,11 @@ else {
     binmode F;
     $_ = <F>;
     close F;
-#    $_ ||= "\0";
+
     my @c = split '';
-    printf '    ';
+    die "'$image_file' is truncated. Remove it and rerun make\n" if [EMAIL 
PROTECTED];
+
+    print '    ';
     my $i;
     for (@c) {
         printf "0x%02x", ord($_);

Reply via email to