JACK-AUDIO-CONNECTION-KIT
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
jack
weakmacros.h
Go to the documentation of this file.
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 __weakmacros_h__
21
#define __weakmacros_h__
22
23
/*************************************************************
24
* NOTE: JACK_WEAK_EXPORT ***MUST*** be used on every function
25
* added to the JACK API after the 0.116.2 release.
26
*
27
* Functions that predate this release are marked with
28
* JACK_WEAK_OPTIONAL_EXPORT which can be defined at compile
29
* time in a variety of ways. The default definition is empty,
30
* so that these symbols get normal linkage. If you wish to
31
* use all JACK symbols with weak linkage, include
32
* <jack/weakjack.h> before jack.h.
33
*************************************************************/
34
35
#ifdef __APPLE__
36
#define WEAK_ATTRIBUTE weak_import
37
#else
38
#define WEAK_ATTRIBUTE __weak__
39
#endif
40
41
#ifndef JACK_WEAK_EXPORT
42
#ifdef __GNUC__
43
/* JACK_WEAK_EXPORT needs to be a macro which
44
expands into a compiler directive. If non-null, the directive
45
must tell the compiler to arrange for weak linkage of
46
the symbol it used with. For this to work full may
47
require linker arguments in the client as well.
48
*/
49
#define JACK_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE))
50
#else
51
/* Add other things here for non-gcc platforms */
52
#endif
53
#endif
54
55
#ifndef JACK_OPTIONAL_WEAK_EXPORT
56
#define JACK_OPTIONAL_WEAK_EXPORT
57
#endif
58
59
#ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
60
#ifdef __GNUC__
61
#define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((__deprecated__))
62
#else
63
/* Add other things here for non-gcc platforms */
64
#endif
/* __GNUC__ */
65
#endif
66
67
#endif
/* __weakmacros_h__ */
Generated by
1.9.1