# New Ticket Created by James Keenan
# Please include the string: [perl #57956]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57956 >
Last night I realized that about five of the configuration step tests
were not cleaning up properly after themselves. They were leaving
the detritus of their C probes in the top-level Parrot directory:
lots of files with names like test_1.c.
Adding $conf->cc_clean() cleaned these up. But now I'm noticing two
instances where the configuration steps themselves, when run by
Configure.pl, are leaving files in the top-level directory.
The patch attached remedies one of those instances. There was a C-
probe for hugefloatvalsize in config/auto/sizes that was written in a
non-standard way, i.e., it did not begin with a $conf->cc_gen()
call. Rather, it simply printed the file in the top-level
directory. In the patch, I take what was the test and put it in a
probe template file modeled after the others accompanying this config
step.
Since I have never actually written a probe before, please review
this. I can state that on Linux, it results in the same value for
$PConfig{hugefloatvalsize} as previously. Consequently, all core
tests continue to pass.
There is one 'test.cco' file still being generated by something in
Configure.pl, but I haven't located its source yet.
Thank you very much.
kid51
Index: MANIFEST
===================================================================
--- MANIFEST (revision 30255)
+++ MANIFEST (working copy)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Fri Aug 15 13:35:39 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Aug 16 00:23:01 2008 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -284,6 +284,7 @@
config/auto/signal/test_itimer.in []
config/auto/sizes.pm []
config/auto/sizes/test2_c.in []
+config/auto/sizes/test3_c.in []
config/auto/sizes/test_c.in []
config/auto/snprintf.pm []
config/auto/snprintf/test.in []
@@ -2011,6 +2012,7 @@
languages/perl6/t/pmc/mutablevar.t [perl6]
languages/perl6/t/pmc/perl6multisub-basic.t [perl6]
languages/perl6/t/pmc/perl6multisub-dispatch-arity.t [perl6]
+languages/perl6/t/pmc/perl6multisub-dispatch-type.t [perl6]
languages/perl6/t/spectest_regression.data [perl6]
languages/perl6/tools/autounfudge.pl [perl6]
languages/perl6/tools/fudge_purity_inspector.pl [perl6]
Index: config/auto/sizes/test3_c.in
===================================================================
--- config/auto/sizes/test3_c.in (revision 0)
+++ config/auto/sizes/test3_c.in (revision 0)
@@ -0,0 +1,14 @@
+/*
+ * test.c - figure out if a 64-bit type is available
+ *
+ * This file is automatically generated by Configure
+ * from test3_c.in.
+ */
+
+#include <stdio.h>
+
+int main(int argc, char **argv) {
+ long double foo;
+ printf("%u", sizeof(foo));
+ return 0;
+}
Property changes on: config/auto/sizes/test3_c.in
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Index: config/auto/sizes.pm
===================================================================
--- config/auto/sizes.pm (revision 30255)
+++ config/auto/sizes.pm (working copy)
@@ -221,25 +221,14 @@
sub _probe_for_hugefloatval {
my $conf = shift;
- my $size = q{};
- $size = eval {
- open( my $TEST, ">", "test.c" ) or die "Can't open test.c: $!";
- print {$TEST} <<'END';
-#include <stdio.h>
-
-int main() {
- long double foo;
- printf("%u", sizeof(foo));
- return 0;
+ my $size;
+ $conf->cc_gen('config/auto/sizes/test3_c.in');
+ $conf->cc_build();
+ $size = eval $conf->cc_run();
+ $conf->cc_clean();
+ return $size;
}
-END
- close $TEST;
- $conf->cc_build();
- $conf->cc_run();
- };
-}
-
sub _set_hugefloatval {
my ( $conf, $size ) = @_;
if ( $size ) {