Re: Shared library: loading doesn't call shared static this

2013-12-08 Thread Ellery Newcomer
On Sunday, 8 December 2013 at 10:31:32 UTC, Mathias LANG wrote: Thank you, and yazd, it did the trick. May I ask why I don't want to call it multiple time though ? From the sentence If the runtime was already successfully initialized this returns true., I though this was handled in some way.

Shared library: loading doesn't call shared static this

2013-12-07 Thread Mathias LANG
Hello, I'm in the process of creating a PAM module using D. First step, I ported pam/modules.h and the included pam/_types.h to D, pretty straightforward. Then I created a simple D source, which looks like: extern(C) int pam_sm_open_session(pam_handle_t* pamh, int flags, int ac, const

Re: Shared library: loading doesn't call shared static this

2013-12-07 Thread yazd
On Saturday, 7 December 2013 at 20:11:15 UTC, Mathias LANG wrote: Hello, I'm in the process of creating a PAM module using D. First step, I ported pam/modules.h and the included pam/_types.h to D, pretty straightforward. Then I created a simple D source, which looks like: extern(C) int

Re: Shared library: loading doesn't call shared static this

2013-12-07 Thread Ellery Newcomer
On Saturday, 7 December 2013 at 20:11:15 UTC, Mathias LANG wrote: afaik, druntime does not officially support the C main, D shared library use case yet. If you have only 1 D shared library, you can insert calls to rt_init and rt_term into shared lib constructors/dtors with gcc. This has