June 28, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398


Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #679 is|0                           |1
           obsolete|                            |


--- Comment #10 from Johannes Pfau <johannespfau@gmail.com> 2010-06-28 07:53:42 PDT ---
Created an attachment (id=683)
Updated patch for druntime

Added a new patch for druntime using extern(System). If extern(System) is
extern(Windows) on windows and extern(C) on posix, this will work fine, I just
did not know about extern(System).

I also removed the version blocks in src/rt/deh.c (first it's a c file, so
version blocks don't belong there anyway, second the whole file is in an "#if
_WIN32" block)
(a stupid mistake, deh.c is not compiled on posix, so I didn't see the error)

(related note: deh2.d is not used on windows, so extern(C) would work as well,
just the current extern(Windows) can't work)

@Eldar Insafutdinov thanks for the string mixin advice

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 28, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398


Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #678 is|0                           |1
           obsolete|                            |


--- Comment #11 from Johannes Pfau <johannespfau@gmail.com> 2010-06-28 08:04:46 PDT ---
Created an attachment (id=684)
Updated patch for dmd2

Somehow switched LONGJMP_MANGLE_NAME and CPP_LONGJMP_MANGLE_NAME in the first patch.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 28, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #12 from Leandro Lucarella <llucax@gmail.com> 2010-06-28 08:14:08 PDT ---
(In reply to comment #10)
> Created an attachment (id=683) [details]
> Updated patch for druntime
> 
> Added a new patch for druntime using extern(System). If extern(System) is
> extern(Windows) on windows and extern(C) on posix, this will work fine, I just
> did not know about extern(System).

I filled a bug (bug 4399) because as far as I can see, it's undocumented (I
knew it existed because it's in the changelog and I remember some discussion
about it in the group).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 28, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398


Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #683 is|0                           |1
           obsolete|                            |


--- Comment #13 from Johannes Pfau <johannespfau@gmail.com> 2010-06-28 08:28:14 PDT ---
Created an attachment (id=685)
Patch for druntime, third edition

I was wrong, there is a linux _d_throw(Object *h) in deh.c, but it seems deprecated by deh2.d. Just in case this new patch also fixes the _d_throw in deh.c.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398


nfxjfg@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg@gmail.com


--- Comment #14 from nfxjfg@gmail.com 2010-10-10 05:46:28 PDT ---
Most retarded patch ever and supports my theory that Walter is just trolling everyone, instead of intending to produce something useful.

WHY.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #15 from nfxjfg@gmail.com 2010-10-10 05:48:52 PDT ---
(In reply to comment #14)
> patch
I mean bug.
Uf dmd had a healthy development model, this should have been fixed 5 minutes
after the bug was reported.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #16 from Marenz <dmdtracker@supradigital.org> 2010-10-10 06:20:39 PDT ---
(In reply to comment #5)
> To avoid code duplication in case extern(System) won't help you here you can
> use string mixins.
> 
> P.S. Is it the only issue that prevents dmd from being able to build shared libraries on linux or there are more?

I just tried the patches on dmd.1.064
It crashes upon new exception.


#0  0x00000001 in ?? ()
#1  0xb7fdea83 in test.Test.badboy (this=0xb7d2ef90) at test.d:13
#2  0x08049b39 in D main ()
#3  0x0805a1c6 in rt.compiler.dmd.rt.dmain2.main() ()
#4  0x0805a120 in rt.compiler.dmd.rt.dmain2.main() ()
#5  0x0805a203 in rt.compiler.dmd.rt.dmain2.main() ()
#6  0x0805a120 in rt.compiler.dmd.rt.dmain2.main() ()
#7  0x0805a0d6 in main ()


--Marenz

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #17 from Jacob Carlborg <doob@me.com> 2010-10-10 06:29:39 PDT ---
I don't think that the attached patches are correct. As far as I can see
looking at the makefiles, deh.c is used on windows and deh2.d is used on posix.
So _d_throw in deh2.d would be extern (C) or extern (Windows) (doesn't really
matter) then _d_throw in deh.c would still be __stdcall.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #18 from Jacob Carlborg <doob@me.com> 2010-10-10 06:30:33 PDT ---
(In reply to comment #17)
> I don't think that the attached patches are correct. As far as I can see
> looking at the makefiles, deh.c is used on windows and deh2.d is used on posix.
> So _d_throw in deh2.d would be extern (C) or extern (Windows) (doesn't really
> matter) then _d_throw in deh.c would still be __stdcall.

Sorry, extern (C) or extern (System)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4398



--- Comment #19 from Marenz <dmdtracker@supradigital.org> 2010-10-10 06:35:05 PDT ---
(In reply to comment #18)
> (In reply to comment #17)
> > I don't think that the attached patches are correct. As far as I can see
> > looking at the makefiles, deh.c is used on windows and deh2.d is used on posix.
> > So _d_throw in deh2.d would be extern (C) or extern (Windows) (doesn't really
> > matter) then _d_throw in deh.c would still be __stdcall.
> 
> Sorry, extern (C) or extern (System)

Sorry, I should have mentioned: I tested on linux and I used tango (which has the same files). So the deh.c should not have been used at all, right?

--Marenz

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------