xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/libdruntime/rt/dylib_fixes.c (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1181254a7Smrg /**
2181254a7Smrg  * OS X support for dynamic libraries.
3181254a7Smrg  *
4181254a7Smrg  * Copyright: Copyright Digital Mars 2010 - 2010.
5*b1e83836Smrg  * License:   $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6181254a7Smrg  * Authors:   Walter Bright
7181254a7Smrg  */
8181254a7Smrg 
9181254a7Smrg /*          Copyright Digital Mars 2010 - 2010.
10181254a7Smrg  * Distributed under the Boost Software License, Version 1.0.
11181254a7Smrg  *    (See accompanying file LICENSE or copy at
12181254a7Smrg  *          http://www.boost.org/LICENSE_1_0.txt)
13181254a7Smrg  */
14181254a7Smrg void* _Dmain __attribute__((weak));
15181254a7Smrg 
16181254a7Smrg char rt_init ();
17181254a7Smrg char rt_term ();
18181254a7Smrg 
initializer()19181254a7Smrg __attribute__((constructor)) static void initializer ()
20181254a7Smrg {
21181254a7Smrg     rt_init();
22181254a7Smrg }
23181254a7Smrg 
finalizer()24181254a7Smrg __attribute__((destructor)) static void finalizer ()
25181254a7Smrg {
26181254a7Smrg     rt_term();
27181254a7Smrg }
28181254a7Smrg 
29