www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - std.loader - portability patched

reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
I ported loader.d to Darwin and Mac OS X.
http://www.algonet.se/~afb/d/loader-darwin.patch


I didn't bother changing any of the old code,
just cut-and-pasted the old linux version...

When the loader.d module gets the refactoring
it so well deserves, it should be easy to keep ?


I have used a lower case "darwin", since that
is what gdc sets. The old code used both cases:
"linux" and "Linux", which doesn't work in gdc.
http://www.algonet.se/~afb/d/loader-linux.patch

On Mac OS X, there are both bundles (.bundle)
and dynamic libraries (.dylib). Bundles are more
similar to .so files, and occur in frameworks.
.dylib are stand-alone, but can't be unloaded...


I didn't have to add any extra libraries,
when I linked and ran the TestMain program.

--anders

PS. Surely the "null is symbol" is not necessary
     anymore, since "symbol = null" is an error ?
     "symbol == null" looks less like a riddle...
Oct 19 2004
parent "Walter" <newshound digitalmars.com> writes:
Thanks. Just so I don't screw up installing the patch, can you please email
me the darwin version of std.loader?
Oct 21 2004