1  /**
       2   * OS X support for dynamic libraries.
       3   *
       4   * Copyright: Copyright Digital Mars 2010 - 2010.
       5   * License:   $(HTTP 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  
      19  __attribute__((constructor)) static void initializer ()
      20  {
      21      rt_init();
      22  }
      23  
      24  __attribute__((destructor)) static void finalizer ()
      25  {
      26      rt_term();
      27  }