Brent Dax:
# I'll work on it later today.

Patch below sig.  I don't know if (or even really think that) this will
apply cleanly--I haven't updated my CVS in a while--but I don't expect
this to go in until after 0.02.  This is basically just to show you what
I'm thinking.  Let me know if my thought process is flawed.

--Brent Dax
[EMAIL PROTECTED]

They *will* pay for what they've done.


--- ..\..\parrot-cvs\parrot\Configure.pl        Tue Sep 18 11:32:06 2001
+++ Configure.pl        Thu Sep 20 01:48:06 2001
@@ -62,6 +62,8 @@
 my(%c)=(
        iv =>                   ($Config{ivtype}||'long'),
        nv =>                   ($Config{nvtype}||'double'),
+       ivsize =>               undef,          #filled in later in
program
+       nvsize =>               undef,          #ditto
        cc =>                   $Config{cc},
        #ADD C COMPILER FLAGS HERE
        ccflags =>              $Config{ccflags}." -I./include",
@@ -118,6 +120,17 @@

 print <<"END";

+Alright, I'm now gonna compile and run a little C program
+to figure some stuff out.
+END
+
+buildfile("test_c");
+system("$c{cc} test.c $c{ccflags} -o test$c{exe}") and die "Compilation
of test.c unsuccessful";
+@c{qw(ivsize nvsize)}=(`test$c{exe}` =~ m{(\d+)/(\d+)});
+unlink('test$c{exe}', 'test.c');
+
+print <<"END";
+
 Okay, that's finished.  I'm now going to write your very
 own Makefile, config.h, and Parrot::Config to disk.
 END


--- ..\..\parrot-cvs\parrot\config_h.in Fri Sep 14 09:40:36 2001
+++ config_h.in Thu Sep 20 01:44:36 2001
@@ -6,8 +6,12 @@

 #if !defined(PARROT_CONFIG_H_GUARD)
 #define PARROT_CONFIG_H_GUARD
+
 typedef ${iv} IV;
+#define ivsize ${ivsize}
+
 typedef ${nv} NV;
+#define nvsize ${nvsize}

 typedef struct _vtable VTABLE;
 typedef void DPOINTER;
@@ -24,7 +28,6 @@

 #define MASK_CHUNK_LOW_BITS 0xfffff000

-
 ${headers}


--- /dev/null   Wed Dec 31 16:00:00 1969
+++ test_c.in   Thu Sep 20 01:31:36 2001
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(int argc, char **argv) {
+       printf("%d/%d", sizeof(${iv}), sizeof(${nv}));
+       return 0;
+}

Reply via email to