Jack2 1.9.21

weakjack.h
1/*
2 Copyright (C) 2010 Paul Davis
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18*/
19
20#ifndef __weakjack_h__
21#define __weakjack_h__
22
88#ifdef __APPLE__
89#define WEAK_ATTRIBUTE weak_import
90#else
91#define WEAK_ATTRIBUTE __weak__
92#endif
93
94#ifndef JACK_OPTIONAL_WEAK_EXPORT
95/* JACK_OPTIONAL_WEAK_EXPORT needs to be a macro which
96 expands into a compiler directive. If non-null, the directive
97 must tell the compiler to arrange for weak linkage of
98 the symbol it used with. For this to work fully may
99 require linker arguments for the client as well.
100*/
101#ifdef __GNUC__
102#define JACK_OPTIONAL_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE))
103#else
104/* Add other things here for non-gcc platforms */
105#endif
106#endif
107
108#ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
109/* JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT needs to be a macro
110 which expands into a compiler directive. If non-null, the directive
111 must tell the compiler to arrange for weak linkage of the
112 symbol it is used with AND optionally to mark the symbol
113 as deprecated. For this to work fully may require
114 linker arguments for the client as well.
115*/
116#ifdef __GNUC__
117#define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((WEAK_ATTRIBUTE,__deprecated__))
118#else
119/* Add other things here for non-gcc platforms */
120#endif
121#endif
122
125#endif /* weakjack */