xref: /netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/rt/dylib_fixes.c (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1 /**
2  * OS X support for dynamic libraries.
3  *
4  * Copyright: Copyright Digital Mars 2010 - 2010.
5  * License:   $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6  * Authors:   Walter Bright
7  */
8 
9 /*          Copyright Digital Mars 2010 - 2010.
10  * Distributed under the Boost Software License, Version 1.0.
11  *    (See accompanying file LICENSE or copy at
12  *          http://www.boost.org/LICENSE_1_0.txt)
13  */
14 void* _Dmain __attribute__((weak));
15 
16 char rt_init ();
17 char rt_term ();
18 
initializer()19 __attribute__((constructor)) static void initializer ()
20 {
21     rt_init();
22 }
23 
finalizer()24 __attribute__((destructor)) static void finalizer ()
25 {
26     rt_term();
27 }
28 
29