Author: jkeenan
Date: Tue Aug 19 18:47:52 2008
New Revision: 30366

Added:
   trunk/config/auto/sizes/test3_c.in   (contents, props changed)
Modified:
   trunk/MANIFEST
   trunk/MANIFEST.SKIP
   trunk/config/auto/sizes.pm

Log:
Applying patch submitted in
http://rt.perl.org/rt3/Ticket/Display.html?id=57956.  Convert one system probe
in auto::sizes to a more standard format (test3_c.in as template file) so that
the config step leaves not 'test*' file behind in top-level directory after
configuration.


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Tue Aug 19 18:47:52 2008
@@ -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                                []

Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP (original)
+++ trunk/MANIFEST.SKIP Tue Aug 19 18:47:52 2008
@@ -1,6 +1,6 @@
 # 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 Wed Aug 20 01:43:28 2008 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -509,8 +509,10 @@
 ^languages/abc/Makefile$
 ^languages/abc/Makefile/
 # generated from svn:ignore of 'languages/abc/src/'
-^languages/abc/src/gen_grammar-actions\.pir$
-^languages/abc/src/gen_grammar-actions\.pir/
+^languages/abc/src/gen_actions\.pir$
+^languages/abc/src/gen_actions\.pir/
+^languages/abc/src/gen_builtins\.pir$
+^languages/abc/src/gen_builtins\.pir/
 ^languages/abc/src/gen_grammar\.pir$
 ^languages/abc/src/gen_grammar\.pir/
 # generated from svn:ignore of 'languages/abc/t/'

Modified: trunk/config/auto/sizes.pm
==============================================================================
--- trunk/config/auto/sizes.pm  (original)
+++ trunk/config/auto/sizes.pm  Tue Aug 19 18:47:52 2008
@@ -221,23 +221,12 @@
 
 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;
-}
-END
-        close $TEST;
-
-        $conf->cc_build();
-        $conf->cc_run();
-    };
+    my $size;
+    $conf->cc_gen('config/auto/sizes/test3_c.in');
+    $conf->cc_build();
+    $size = eval $conf->cc_run();
+    $conf->cc_clean();
+    return $size;
 }
 
 sub _set_hugefloatval {

Added: trunk/config/auto/sizes/test3_c.in
==============================================================================
--- (empty file)
+++ trunk/config/auto/sizes/test3_c.in  Tue Aug 19 18:47:52 2008
@@ -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;
+}

Reply via email to