Re: [perl #30852] [PATCH] Undef.set_pmc(), Ref allowing null values

2004-07-29 Thread Leopold Toetsch
Togos <[EMAIL PROTECTED]> wrote:

> This patch changes the Undef PMC type to morph itself
> to a Ref with the given value when set_pmc()d. In
> order to do this it was also necessary to allow Ref
> PMCs to point to NULL values,

I've changed that to PMCNULL, which will catch access to such NULLs and
not segfault.

[ please provide unified diffs with -u ]

Thanks, applied.
leo


Re: This week's summary

2004-07-29 Thread Piers Cawley
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:

> Piers Cawley wrote:
>> Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:
>>>Care to explain what those are, O great math teacher?
>> What's a math teacher?
>
> It's the right^H^H^H^H^HAmerican way to say "maths teacher".

You mean American and 'right' are not equivalent? Wow.



RE: This week's summary

2004-07-29 Thread Butler, Gerald

Of course American and Right are synonymous! Just ask OUR WONDERFUL GOD (I
mean President) GEORGE W. BUSH. He'll tell ya'


-Original Message-
From: Piers Cawley [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 6:49 AM
To: Brent 'Dax' Royal-Gordon
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: This week's summary


Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:

> Piers Cawley wrote:
>> Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:
>>>Care to explain what those are, O great math teacher?
>> What's a math teacher?
>
> It's the right^H^H^H^H^HAmerican way to say "maths teacher".

You mean American and 'right' are not equivalent? Wow.


 The information contained in this e-mail message is privileged and/or
 confidential and is intended only for the use of the individual or entity
 named above.  If the reader of this message is not the intended recipient,
 or the employee or agent responsible to deliver it to the intended 
 recipient, you are hereby notified that any dissemination, distribution or 
 copying of this communication is strictly prohibited.  If you have received 
 this communication in error, please immediately notify us by telephone
 (330-668-5000), and destroy the original message.  Thank you.  




RE: This week's summary

2004-07-29 Thread Simon Glover

On Thu, 29 Jul 2004, Butler, Gerald wrote:

> 
> Of course American and Right are synonymous! Just ask OUR WONDERFUL GOD (I
> mean President) GEORGE W. BUSH. He'll tell ya'
> 

 OK, gentlemen, this is both way off topic and starting to head into flame
 war territory, so I suggest that we either quietly drop it, or move it
 elsewhere.

 Simon

 PS Gerald, this isn't aimed at you specifically -- yours just happens to
 be the most recent message in the thread.



[perl #30873] Parrot_memcpy_aligned_mmx_debug: Assertion failed

2004-07-29 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30873]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30873 >


Freshly checked out parrot (as of Jul-28 8pm GMTish) when configured
with "--floatval='long double'" runs into trouble in a x86 system (*):

...
./parrot config_lib.pasm
If the next line prints 0.1.0-devel, it did help.
./parrot parrot-config.imc VERSION DEVEL
parrot: src/platform.c:657: Parrot_memcpy_aligned_mmx_debug: Assertion
`((unsigned long) d & 7) == 0' failed.
make: *** [runtime/parrot/include/config.fpmc] Aborted (core dumped)

(*) Debian 3.0, cat /proc/cpuinfo says:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 6
model   : 3
model name  : AMD Duron(tm) Processor
stepping: 1
cpu MHz : 801.847
cache size  : 64 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnowbogomips
 : 1599.07


-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen



[perl #30874] [PATCH] src/packdump.c

2004-07-29 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30874]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30874 >


Currently pdump doesn't build because of a booboo in src/packdump.c -
this is for example what gcc thinks of it:

src/packdump.c: In function `PackFile_Constant_dump':
src/packdump.c:123: error: dereferencing pointer to incomplete type
src/packdump.c:124: error: dereferencing pointer to incomplete type

Other compilers are not much happier.

Patch attached.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen
--- src/packdump.c.dist 2004-07-29 22:42:09.0 +0300
+++ src/packdump.c  2004-07-29 22:48:07.0 +0300
@@ -105,22 +105,23 @@
 PIO_printf(interpreter, "[ 'PFC_PMC', {\n");
 {
 PMC *pmc = self->u.key;
-struct Parrot_Sub *sub;
-int code_start = (int)interpreter->code->cur_cs->base.data;
+parrot_sub_t sub;
+INTVAL code_start =
+PTR2INTVAL(interpreter->code->cur_cs->base.data);
 switch (pmc->vtable->base_type) {
 case enum_class_Sub:
 case enum_class_Closure:
 case enum_class_Continuation:
 case enum_class_Coroutine:
-sub = (struct Parrot_Sub*) PMC_sub(pmc);
+sub = PMC_sub(pmc);
 PIO_printf(interpreter,
 "\tclass => %s, "
 "start_offs => %d, "
 "end_offs => %d, "
 "packed => '%s'\n",
 (char*)pmc->vtable->whoami->strstart,
-(int)PMC_struct_val(pmc) - code_start,
-(int)sub->end - code_start,
+PTR2INTVAL(PMC_struct_val(pmc)) - code_start,
+PTR2INTVAL(sub->end) - code_start,
 sub->packed);
 break;
 default:


[perl #30878] [PATCH] tru64 aio detection

2004-07-29 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30878]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30878 >


-laio needed.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

diff -u -r1.7 dec_osf.pl
--- config/init/hints/dec_osf.pl10 Apr 2004 11:51:43 -  1.7
+++ config/init/hints/dec_osf.pl29 Jul 2004 22:49:05 -
@@ -11,6 +11,9 @@
 if ( $libs !~ /-lpthread/ ) {
 $libs .= ' -lpthread';
 }
+if ( $libs !~ /-laio/ ) {
+$libs .= ' -laio';
+}
 Configure::Data->set(
 libs => $libs,
 );


[perl #30879] [PATCH] IRIX offsetof

2004-07-29 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30879]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30879 >


Some compilers of IRIX seem to have a quite broken definition of
offsetof.  Hand-roll our own if such a compiler is detected.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

diff -u -r1.98 parrot.h
--- include/parrot/parrot.h 13 Jul 2004 14:09:17 -  1.98
+++ include/parrot/parrot.h 29 Jul 2004 22:49:06 -
@@ -179,6 +179,13 @@
 #endif /* __GCC__ */
 
 
+/* some SGI compilers have an offsetof()
+ * definition that doesn't work for us. */
+#if defined(__sgi) && defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 400)
+#undef offsetof
+#define offsetof(s, m) (size_t)(&(((s *)0)->m))
+#endif
+
 /* work around warning:
  * cast discards qualifiers from pointer target type
  * for usage grep e.g. in string.c


[perl #30880] [PATCH] const* vs non compiler silencing

2004-07-29 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30880]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30880 >



-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

diff -u -r1.211 string.c
--- src/string.c29 Jul 2004 06:56:35 -  1.211
+++ src/string.c29 Jul 2004 22:49:10 -
@@ -258,7 +258,7 @@
 data_dir = const_cast(DEFAULT_ICU_DATA_DIR);
 string_set_data_directory(data_dir);
 if (free_data_dir)
-mem_sys_free(data_dir);
+mem_sys_free((void*)data_dir); /* cast away the constness */
 /*
 encoding_init();
 chartype_init();