Crudebyte Logo
weakmacros.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2001-2013
3 
4  Developers:
5 
6  Paul Davis
7  Jack O'Quin
8  Steve Harris
9  Rui Nuno Capela
10  Devin Anderson
11  Kai Vehmanen
12  Ian Esten
13  Dmitry Baikov
14  Torben Hohn
15  Rohan Drape
16  Stephane Letz
17  Christian Schoenebeck
18 
19  This program is free software; you can redistribute it and/or modify
20  it under the terms of the GNU Lesser General Public License as published by
21  the Free Software Foundation; either version 2.1 of the License, or
22  (at your option) any later version.
23 
24  This program is distributed in the hope that it will be useful,
25  but WITHOUT ANY WARRANTY; without even the implied warranty of
26  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  GNU Lesser General Public License for more details.
28 
29  You should have received a copy of the GNU Lesser General Public License
30  along with this program; if not, write to the Free Software
31  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 
33  You are permitted to statically link against a binary version of
34  the JACK library obtained from
35 
36  http://jackaudio.org/downloads/JackiOS-SDK.zip
37 
38  and distribute the resulting application without complying with section 6
39  (requiring recipients of your application to be able to relink against
40  modified versions of libjack).
41 
42  This permission is granted if and ONLY if the resulting application binary
43  issue is intended for execution in any one of the following environments:
44 
45  * Apple Inc. iOS
46 
47  Additional environments may be added to this list in the future.
48  All other terms of the LGPL continue to apply.
49 
50 */
51 
52 #ifndef __weakmacros_h__
53 #define __weakmacros_h__
54 
60 /*************************************************************
61  * NOTE: JACK_WEAK_EXPORT ***MUST*** be used on every function
62  * added to the JACK API after the 0.116.2 release.
63  *
64  * Functions that predate this release are marked with
65  * JACK_WEAK_OPTIONAL_EXPORT which can be defined at compile
66  * time in a variety of ways. The default definition is empty,
67  * so that these symbols get normal linkage. If you wish to
68  * use all JACK symbols with weak linkage, include
69  * <jack/weakjack.h> before jack.h.
70  *************************************************************/
71 
72 #ifdef __APPLE__
73 #define WEAK_ATTRIBUTE weak_import
74 #else
75 #define WEAK_ATTRIBUTE __weak__
76 #endif
77 
78 #ifndef JACK_WEAK_EXPORT
79 #ifdef __GNUC__
80 /* JACK_WEAK_EXPORT needs to be a macro which
81  expands into a compiler directive. If non-null, the directive
82  must tell the compiler to arrange for weak linkage of
83  the symbol it used with. For this to work full may
84  require linker arguments in the client as well.
85 */
86 
87 #ifdef WIN32
88  /*
89  Not working with __declspec(dllexport) so normal linking
90  Linking with JackWeakAPI.cpp will be the preferred way.
91  */
92  #define JACK_WEAK_EXPORT
93 #else
94  #define JACK_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE))
95 #endif
96 
97 #else
98 /* Add other things here for non-gcc platforms */
99 
100 #ifdef WIN32
101 #define JACK_WEAK_EXPORT
102 #endif
103 
104 #endif
105 #endif
106 
107 #ifndef JACK_WEAK_EXPORT
108 #define JACK_WEAK_EXPORT
109 #endif
110 
111 #ifndef JACK_OPTIONAL_WEAK_EXPORT
112 #define JACK_OPTIONAL_WEAK_EXPORT
113 #endif
114 
115 #ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
116 #ifdef __GNUC__
117 #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((__deprecated__))
118 #else
119 /* Add other things here for non-gcc platforms */
120 
121 #ifdef WIN32
122 #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
123 #endif
124 
125 #endif /* __GNUC__ */
126 
127 #ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
128 #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
129 #endif
130 
131 #endif
132 
133 #endif /* __weakmacros_h__ */
134 
DE • EN
Copyright © MMXIII Crudebyte. All rights reserved.

twitter