JACK-AUDIO-CONNECTION-KIT 0.124.0

weakjack.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2010 Paul Davis
00003     
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as published by
00006     the Free Software Foundation; either version 2.1 of the License, or
00007     (at your option) any later version.
00008     
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013     
00014     You should have received a copy of the GNU Lesser General Public License
00015     along with this program; if not, write to the Free Software 
00016     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 
00018 */
00019 
00020 #ifndef __weakjack_h__
00021 #define __weakjack_h__
00022 
00088 #ifdef __APPLE__
00089 #define WEAK_ATTRIBUTE weak_import
00090 #else
00091 #define WEAK_ATTRIBUTE __weak__
00092 #endif
00093 
00094 #ifndef JACK_OPTIONAL_WEAK_EXPORT
00095 /* JACK_OPTIONAL_WEAK_EXPORT needs to be a macro which
00096    expands into a compiler directive. If non-null, the directive 
00097    must tell the compiler to arrange for weak linkage of 
00098    the symbol it used with. For this to work fully may
00099    require linker arguments for the client as well.
00100 */
00101 #ifdef __GNUC__
00102 #define JACK_OPTIONAL_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE))
00103 #else
00104 /* Add other things here for non-gcc platforms */
00105 #endif
00106 #endif
00107 
00108 #ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
00109 /* JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT needs to be a macro
00110    which expands into a compiler directive. If non-null, the directive
00111    must tell the compiler to arrange for weak linkage of the
00112    symbol it is used with AND optionally to mark the symbol
00113    as deprecated. For this to work fully may require
00114    linker arguments for the client as well.
00115 */
00116 #ifdef __GNUC__
00117 #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((WEAK_ATTRIBUTE,__deprecated__))
00118 #else
00119 /* Add other things here for non-gcc platforms */
00120 #endif
00121 #endif
00122 
00125 #endif /* weakjack */
00126