2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
27 * $XConsortium: DynamicLib.C /main/4 1996/04/21 19:48:04 drk $
29 * RESTRICTED CONFIDENTIAL INFORMATION:
31 * The information in this document is subject to special
32 * restrictions in a confidential disclosure agreement bertween
33 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
34 * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
35 * Sun's specific written approval. This documment and all copies
36 * and derivative works thereof must be returned or destroyed at
39 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
44 #include "DynamicLib.hh"
45 #include "DlDynamicLib.hh"
46 #include "NotDynamic.hh"
48 // The purpose of this function is to map the virtual DynamicLib object
49 // into a platform specific implementation at compile time. This is
50 // a fairly ugly process that requires lots of ifdef's based on the
51 // particular implementation of shared libraries.
53 // Adding a new dynamic library implementation for a platform involves
56 // 1) Create a new implementation of the DynamicLib object (see
57 // DlDynamicLib.C for an example).
59 // 2) Adding the appropriate ifdef construction step to this function.
63 CreatePlatformDl(const char * path)
65 #if defined(DL_DYNAMIC_LIBS)
66 DynamicLib * dl = new DlDynamicLib(path);
69 #if defined(DL_NOT_DYNAMIC)
70 DynamicLib * dl = new NotDynamic(path);
73 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING
74 // *******************************************************
75 // If you get a compile error because "dl" is not defined,
76 // then you have not specified your platforms dynamic library
77 // implementation. You MUST do this for this code to work!
78 // *******************************************************
79 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING
83 #ifndef CAN_INLINE_VIRTUALS
84 DynamicLib::~DynamicLib( void )
87 #endif /* ! CAN_INLINE_VIRTUALS */