[svn:parrot] r38371 - in branches/auto_format_refactor: . config/auto config/auto/format config/auto/sizes
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sun Apr 26 13:30:17 UTC 2009
Author: jkeenan
Date: Sun Apr 26 13:30:16 2009
New Revision: 38371
URL: https://trac.parrot.org/parrot/changeset/38371
Log:
Move two internal methods for determining min/max macros to auto::sizes.
Added:
branches/auto_format_refactor/config/auto/sizes/floatval_maxmin_c.in
- copied unchanged from r38370, branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in
branches/auto_format_refactor/config/auto/sizes/intval_maxmin_c.in
- copied unchanged from r38370, branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in
Deleted:
branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in
branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in
Modified:
branches/auto_format_refactor/MANIFEST
branches/auto_format_refactor/MANIFEST.SKIP
branches/auto_format_refactor/config/auto/format.pm
branches/auto_format_refactor/config/auto/sizes.pm
Modified: branches/auto_format_refactor/MANIFEST
==============================================================================
--- branches/auto_format_refactor/MANIFEST Sun Apr 26 13:02:50 2009 (r38370)
+++ branches/auto_format_refactor/MANIFEST Sun Apr 26 13:30:16 2009 (r38371)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Apr 26 06:09:46 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Apr 26 13:23:00 2009 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -232,8 +232,6 @@
config/auto/env/test_unsetenv_c.in []
config/auto/fink.pm []
config/auto/format.pm []
-config/auto/format/floatval_maxmin_c.in []
-config/auto/format/intval_maxmin_c.in []
config/auto/funcptr.pm []
config/auto/funcptr/test_c.in []
config/auto/gc.pm []
@@ -285,6 +283,8 @@
config/auto/signal/test2_c.in []
config/auto/signal/test_itimer_c.in []
config/auto/sizes.pm []
+config/auto/sizes/floatval_maxmin_c.in []
+config/auto/sizes/intval_maxmin_c.in []
config/auto/sizes/test2_c.in []
config/auto/sizes/test3_c.in []
config/auto/sizes/test_c.in []
Modified: branches/auto_format_refactor/MANIFEST.SKIP
==============================================================================
--- branches/auto_format_refactor/MANIFEST.SKIP Sun Apr 26 13:02:50 2009 (r38370)
+++ branches/auto_format_refactor/MANIFEST.SKIP Sun Apr 26 13:30:16 2009 (r38371)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Apr 15 17:34:44 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Apr 26 13:09:44 2009 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -775,6 +775,9 @@
^src/gc/.*\.so/
^src/gc/Makefile$
^src/gc/Makefile/
+# generated from svn:ignore of 'src/interp/'
+^src/interp/.*\.str$
+^src/interp/.*\.str/
# generated from svn:ignore of 'src/io/'
^src/io/.*\.o$
^src/io/.*\.o/
Modified: branches/auto_format_refactor/config/auto/format.pm
==============================================================================
--- branches/auto_format_refactor/config/auto/format.pm Sun Apr 26 13:02:50 2009 (r38370)
+++ branches/auto_format_refactor/config/auto/format.pm Sun Apr 26 13:30:16 2009 (r38371)
@@ -35,12 +35,8 @@
_set_intvalfmt($conf);
- _set_intvalmaxmin($conf);
-
_set_floatvalfmt_nvsize($conf);
- _set_floatvalmaxmin($conf);
-
return 1;
}
@@ -64,43 +60,6 @@
$conf->data->set( intvalfmt => $ivformat );
}
-# This is unrelated to format, may be moved to other place later
-sub _set_intvalmaxmin {
- my $conf = shift;
- my $ivmin;
- my $ivmax;
- my $iv = $conf->data->get(qw(iv));
-
- if ( $iv eq "int" ) {
- $ivmin = 'INT_MIN';
- $ivmax = 'INT_MAX';
- }
- elsif ( ( $iv eq "long" ) || ( $iv eq "long int" ) ) {
- $ivmin = 'LONG_MIN';
- $ivmax = 'LONG_MAX';
- }
- elsif ( ( $iv eq "long long" ) || ( $iv eq "long long int" ) ) {
- # The assumption is that a compiler that have the long long type
- # also provides his limit macros.
- $ivmin = 'LLONG_MIN';
- $ivmax = 'LLONG_MAX';
- }
- else {
- die qq{Configure.pl: Can't find limits for type '$iv'\n};
- }
-
- $conf->data->set( intvalmin => $ivmin );
- $conf->data->set( intvalmax => $ivmax );
-
- $conf->cc_gen('config/auto/format/intval_maxmin_c.in');
- eval { $conf->cc_build(); };
- if ( $@ ) {
- $ivmin = '0';
- $ivmax = '0';
- }
-
-}
-
sub _set_floatvalfmt_nvsize {
my $conf = shift;
my ( $nv, $floatsize, $doublesize, $ldsize ) =
@@ -134,40 +93,6 @@
);
}
-# This is unrelated to format, may be moved to other place later
-sub _set_floatvalmaxmin {
- my $conf = shift;
- my $nvmin;
- my $nvmax;
- my $nv = $conf->data->get(qw(nv));
-
- if ( $nv eq "double" ) {
- $nvmin = 'DBL_MIN';
- $nvmax = 'DBL_MAX';
- }
- elsif ( $nv eq "long double" ) {
-
- # Stay way from long double for now (it may be 64 or 80 bits)
- # die "long double not supported at this time, use double.";
- $nvmin = 'LDBL_MIN';
- $nvmax = 'LDBL_MAX';
- }
- else {
- die qq{Configure.pl: Can't find limits for type '$nv'\n};
- }
-
- $conf->data->set( floatvalmin => $nvmin );
- $conf->data->set( floatvalmax => $nvmax );
-
- $conf->cc_gen('config/auto/format/floatval_maxmin_c.in');
- eval { $conf->cc_build(); };
- if ( $@ ) {
- $nvmin = '0';
- $nvmax = '0';
- }
-
-}
-
1;
# Local Variables:
Deleted: branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in
==============================================================================
--- branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in Sun Apr 26 13:30:16 2009 (r38370)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,24 +0,0 @@
-/*
- Copyright (C) 2008-2009, Parrot Foundation.
- $Id$
-*/
-
-#include <float.h>
-
-int
-main(int argc, char *argv[])
-{
- double i, j;
-
- i = @floatvalmin@;
- j = @floatvalmax@;
-
- return 0;
-}
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in
==============================================================================
--- branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in Sun Apr 26 13:30:16 2009 (r38370)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,25 +0,0 @@
-/*
- Copyright (C) 2008-2009, Parrot Foundation.
- $Id$
-*/
-
-#if @i_limits@ == "define"
-# include <limits.h>
-#endif
-
-int
-main(int argc, char *argv[])
-{
- int i, j;
- i = @intvalmin@;
- j = @intvalmax@;
-
- return 0;
-}
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Modified: branches/auto_format_refactor/config/auto/sizes.pm
==============================================================================
--- branches/auto_format_refactor/config/auto/sizes.pm Sun Apr 26 13:02:50 2009 (r38370)
+++ branches/auto_format_refactor/config/auto/sizes.pm Sun Apr 26 13:30:16 2009 (r38371)
@@ -97,6 +97,10 @@
$conf->cc_clean();
+ _set_intvalmaxmin($conf);
+
+ _set_floatvalmaxmin($conf);
+
return 1;
}
@@ -220,6 +224,59 @@
}
}
+sub _set_intvalmaxmin {
+ my $conf = shift;
+ my $ivmin;
+ my $ivmax;
+ my $iv = $conf->data->get(qw(iv));
+
+ if ( $iv eq "int" ) {
+ $ivmin = 'INT_MIN';
+ $ivmax = 'INT_MAX';
+ }
+ elsif ( ( $iv eq "long" ) || ( $iv eq "long int" ) ) {
+ $ivmin = 'LONG_MIN';
+ $ivmax = 'LONG_MAX';
+ }
+ elsif ( ( $iv eq "long long" ) || ( $iv eq "long long int" ) ) {
+ # The assumption is that a compiler that have the long long type
+ # also provides his limit macros.
+ $ivmin = 'LLONG_MIN';
+ $ivmax = 'LLONG_MAX';
+ }
+ else {
+ die qq{Configure.pl: Can't find limits for type '$iv'\n};
+ }
+
+ $conf->data->set( intvalmin => $ivmin );
+ $conf->data->set( intvalmax => $ivmax );
+}
+
+sub _set_floatvalmaxmin {
+ my $conf = shift;
+ my $nvmin;
+ my $nvmax;
+ my $nv = $conf->data->get(qw(nv));
+
+ if ( $nv eq "double" ) {
+ $nvmin = 'DBL_MIN';
+ $nvmax = 'DBL_MAX';
+ }
+ elsif ( $nv eq "long double" ) {
+
+ # Stay way from long double for now (it may be 64 or 80 bits)
+ # die "long double not supported at this time, use double.";
+ $nvmin = 'LDBL_MIN';
+ $nvmax = 'LDBL_MAX';
+ }
+ else {
+ die qq{Configure.pl: Can't find limits for type '$nv'\n};
+ }
+
+ $conf->data->set( floatvalmin => $nvmin );
+ $conf->data->set( floatvalmax => $nvmax );
+}
+
1;
# Local Variables:
Copied: branches/auto_format_refactor/config/auto/sizes/floatval_maxmin_c.in (from r38370, branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/auto_format_refactor/config/auto/sizes/floatval_maxmin_c.in Sun Apr 26 13:30:16 2009 (r38371, copy of r38370, branches/auto_format_refactor/config/auto/format/floatval_maxmin_c.in)
@@ -0,0 +1,24 @@
+/*
+ Copyright (C) 2008-2009, Parrot Foundation.
+ $Id$
+*/
+
+#include <float.h>
+
+int
+main(int argc, char *argv[])
+{
+ double i, j;
+
+ i = @floatvalmin@;
+ j = @floatvalmax@;
+
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Copied: branches/auto_format_refactor/config/auto/sizes/intval_maxmin_c.in (from r38370, branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/auto_format_refactor/config/auto/sizes/intval_maxmin_c.in Sun Apr 26 13:30:16 2009 (r38371, copy of r38370, branches/auto_format_refactor/config/auto/format/intval_maxmin_c.in)
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 2008-2009, Parrot Foundation.
+ $Id$
+*/
+
+#if @i_limits@ == "define"
+# include <limits.h>
+#endif
+
+int
+main(int argc, char *argv[])
+{
+ int i, j;
+ i = @intvalmin@;
+ j = @intvalmax@;
+
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
More information about the parrot-commits
mailing list