Fixing copyright issues and code contributors
[alexxy/gromacs.git] / src / gmxlib / vmddlopen.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * This file is part of Gromacs        Copyright (c) 1991-2008
5  * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
6  * Copyright (c) 2012,2013, by the GROMACS development team, led by
7  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
8  * others, as listed in the AUTHORS file in the top-level source
9  * directory and at http://www.gromacs.org.
10  *
11  * GROMACS is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public License
13  * as published by the Free Software Foundation; either version 2.1
14  * of the License, or (at your option) any later version.
15  *
16  * GROMACS is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with GROMACS; if not, see
23  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
25  *
26  * If you want to redistribute modifications to GROMACS, please
27  * consider that scientific software is very special. Version
28  * control is crucial - bugs must be traceable. We will be happy to
29  * consider code for inclusion in the official distribution, but
30  * derived work must not be called official GROMACS. Details are found
31  * in the README & COPYING files - if they are missing, get the
32  * official version at http://www.gromacs.org.
33  *
34  * To help us fund GROMACS development, we humbly ask that you cite
35  * the research papers on the package. Check out http://www.gromacs.org.
36  */
37
38 /***************************************************************************
39  *cr
40  *cr            (C) Copyright 1995-2009 The Board of Trustees of the
41  *cr                        University of Illinois
42  *cr                         All Rights Reserved
43  *cr
44 Developed by:           Theoretical and Computational Biophysics Group
45                         University of Illinois at Urbana-Champaign
46                         http://www.ks.uiuc.edu/
47
48 Permission is hereby granted, free of charge, to any person obtaining a copy of
49 this software and associated documentation files (the Software), to deal with
50 the Software without restriction, including without limitation the rights to
51 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
52 of the Software, and to permit persons to whom the Software is furnished to
53 do so, subject to the following conditions:
54
55 Redistributions of source code must retain the above copyright notice,
56 this list of conditions and the following disclaimers.
57
58 Redistributions in binary form must reproduce the above copyright notice,
59 this list of conditions and the following disclaimers in the documentation
60 and/or other materials provided with the distribution.
61
62 Neither the names of Theoretical and Computational Biophysics Group,
63 University of Illinois at Urbana-Champaign, nor the names of its contributors
64 may be used to endorse or promote products derived from this Software without
65 specific prior written permission.
66
67 THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
70 THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
71 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
72 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
73 OTHER DEALINGS WITH THE SOFTWARE.
74  ***************************************************************************/
75
76 /***************************************************************************
77  * RCS INFORMATION:
78  *
79  *      $RCSfile: vmddlopen.h,v $
80  *      $Author: johns $        $Locker:  $             $State: Exp $
81  *      $Revision: 1.9 $      $Date: 2009/07/07 02:40:05 $
82  *
83  ***************************************************************************
84  * DESCRIPTION:
85  *   Routines for loading dynamic link libraries and shared object files
86  *   on various platforms, abstracting from machine dependent APIs.
87  *
88  * LICENSE:
89  *   UIUC Open Source License 
90  *   http://www.ks.uiuc.edu/Research/vmd/plugins/pluginlicense.html
91  *
92  ***************************************************************************/
93
94 /*
95  * vmddlopen: thin multi-platform wrapper around dlopen/LoadLibrary
96  */
97
98 #ifndef VMD_DLOPEN__
99
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103
104 /* Try to open the specified library.  All symbols must be resolved or the 
105  * load will fail (RTLD_NOW).  
106  */
107 void *vmddlopen(const char *fname);
108
109 /* Try to load the specified symbol using the given handle.  Returns NULL if 
110  * the symbol cannot be loaded.
111  */
112 void *vmddlsym(void *h, const char *sym);
113
114 /* Unload the library.  Return 0 on success, nonzero on error. 
115  */
116 int vmddlclose(void *h);
117
118 /* Return last error from any of the above functions.  Not thread-safe on
119  * Windows due to static buffer in our code. 
120  */ 
121 const char *vmddlerror(void);
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif
128