OSX and 64-bit [Re: First working Win64 program!]

Alex Rønne Petersen alex at lycus.org
Mon Aug 13 14:37:12 PDT 2012


On 13-08-2012 23:34, Walter Bright wrote:
> On 8/13/2012 12:41 PM, Sean Kelly wrote:
>> Strangely,libc on OSX is very backwards-compatible. To the point where
>> buggy
>> functions were preserved as-is and updated versions exported via weird
>> labels
>> linked by the compiler using some evil macro code. Needless to say, D
>> unfortunalely links to the buggy versions because there's no way to
>> express
>> the new symbols in-language. I suppose I should try to sort something out
>> using string mixins and inline assembler.
>
> An easy way is to write a .c file for druntime that accepts the call to
> the buggy function and calls the un-buggy one. That way the magic macros
> will work.
>
> I've thought many times about adding a D feature that allows one to
> specify "use this random character string instead of the identifier as
> the symbol name when writing the object file", but never got around to it.
>

I've wanted a feature like that on several occasions (mostly when 
interfacing with non-C/C++ languages). How hard it would it be to 
implement? Theoretically, it sounds simple enough.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d-announce mailing list