The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
DllMain.icpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11//====================================================================
12// DllMain.cpp
13//--------------------------------------------------------------------
14//
15// Package : Gaudi/System
16//
17// Description: The DLL initialisation must be done seperately for
18// each DLL.
19//
20// Author : M.Frank
21// Created : 13/1/99
22// Changes :
23//
24//====================================================================
25#ifndef SYSTEM_DLLMAIN_ICPP
26#define SYSTEM_DLLMAIN_ICPP 1
27
28// this header is only used by the deprecated GaudiKernel/LoadFactoryEntries.h
29// but we want to make sure nobody else is using it
30#if !defined( GAUDIKERNEL_LOADFACTORYENTRIES_H )
31# warning "deprecated header file, not to be used"
32#endif
33
34#include "GaudiKernel/Kernel.h"
35#include "GaudiKernel/System.h"
36
37#if !defined( __APPLE__ )
38class GaudiDll {
40
41public:
42 static void initialize( void* hinstDLL );
43 static void finalize( void* hinstDLL );
44};
45#endif
46
47#if defined( __linux )
48static void _init() __attribute__( ( constructor ) );
49static void _fini() __attribute__( ( destructor ) );
50
51static void _init() { GaudiDll::initialize( 0 ); }
52static void _fini() { GaudiDll::finalize( 0 ); }
53#elif defined( __APPLE__ )
54static void _init() __attribute__( ( constructor ) );
55static void _fini() __attribute__( ( destructor ) );
56
57static void _init() {
58 // FIXME GaudiDll::initialize(0);
59}
60static void _fini() {
61 // FIXME GaudiDll::finalize(0);
62}
63
64#endif
65
66#endif // SYSTEM_DLLMAIN_ICPP
static void initialize(void *hinstDLL)
static void finalize(void *hinstDLL)